Fix monster booted into limbo trying to act
There's a chance that a tactics-using monster (eg. arch-lich) teleporting next to you on a full level would get booted off into limbo. After that, if the monster tried using an item in the same action you'd get panic "relmon: mon not in list" Fix this particular case by checking monster mstate. Other cases may lurk in other places that eventually call mnexto.
This commit is contained in:
@@ -503,8 +503,12 @@ register struct monst *mtmp;
|
||||
|
||||
/* Monsters that want to acquire things */
|
||||
/* may teleport, so do it before inrange is set */
|
||||
if (is_covetous(mdat))
|
||||
if (is_covetous(mdat)) {
|
||||
(void) tactics(mtmp);
|
||||
/* tactics -> mnexto -> deal_with_overcrowding */
|
||||
if (mtmp->mstate)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* check distance and scariness of attacks */
|
||||
distfleeck(mtmp, &inrange, &nearby, &scared);
|
||||
|
||||
Reference in New Issue
Block a user