Author Topic: Bug in mattack::chickenbot, grenade launcher used only when range is exacly 38  (Read 312 times)

Offline latogato

  • NPC
  • **
  • Posts: 131
    • View Profile
I think there is a bug in the mattack::chickenbot, the grenade launcher used only when range is exacly 38.

Code: [Select]
bool mattack::chickenbot(monster *z)
{
{...}
    case 2:
        if( dist <= 20 ) {
            rifle( z, target );
        }
        break;
    case 3:
        if( dist == 38 ) {
            frag( z, target );
        }
        break;
    default:
        return false; // Weak stuff, shouldn't bother with
    }

    return true;
}

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5561
  • I code dead people.
    • View Profile
It's actually kind of hosed all around, it degraded to the point where it can't use anything except the tazer attack.

The problem is several combined bugs, one is it always decides to use the grenade launcher, another is an error in calculating sight range, and the final one is the bug you point out that causes it to fail to use the grenade launcher unless it's at exactly 38 tiles away from the target.

I almost have the bugfixes for all three wrapped up, at which point they will return to full lethality.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline latogato

  • NPC
  • **
  • Posts: 131
    • View Profile
I see you fixed it. Thank you, i can't wait to die by it next time. :D