Fix another "no monster to remove" impossible
Pet ranged attack code was using the same variable for both pet attacking a monster and then the monster's possible retaliation attack. The retaliation obviously overwrote the pet attack return code, allowing pet to move afterwards. In certain case this could result in "no monster to remove" warning.
This commit is contained in:
@@ -917,8 +917,9 @@ pet_ranged_attk(struct monst *mtmp)
|
||||
* if it's blind or unseeing, it can't retaliate
|
||||
*/
|
||||
if (mtarg->mcansee && haseyes(mtarg->data)) {
|
||||
mstatus = mattackm(mtarg, mtmp);
|
||||
if (mstatus & M_ATTK_DEF_DIED)
|
||||
int mresp = mattackm(mtarg, mtmp);
|
||||
|
||||
if (mresp & M_ATTK_DEF_DIED)
|
||||
return MMOVE_DIED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user