Bug in mattack::chickenbot, grenade launcher used only when range is exacly 38

I think there is a bug in the mattack::chickenbot, the grenade launcher used only when range is exacly 38.

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;
} 

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.

I see you fixed it. Thank you, i can’t wait to die by it next time. :smiley: