Fix purple worm ending up in solid wall

If you're in a vault, the vault guard enters, and your tame purple worm
swallows and kills the guard, the worm ended up inside the vault wall.
Instead return the attacker to the old location, if the defender's
position isn't good.
This commit is contained in:
Pasi Kallinen
2020-03-28 11:40:39 +02:00
parent 3eed500886
commit b8668da3ea
2 changed files with 3 additions and 0 deletions

View File

@@ -765,6 +765,8 @@ register struct attack *mattk;
* magr from level.monsters[mdef->mx][mdef->my]. We need to
* put it back and display it. -kd
*/
if (!goodpos(dx, dy, magr, MM_IGNOREWATER))
dx = ax, dy = ay;
place_monster(magr, dx, dy);
newsym(dx, dy);
/* aggressor moves to <dx,dy> and might encounter trouble there */