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

@@ -94,6 +94,7 @@ unicorn corpses and wraith corpses could be sacrificed even if "too old"
hero polymorphed into a hider and hiding was not unhidden when teleporting
impose tighter restraints on 'summon nasties', both for spellcasting monsters
and post-Wizard harassment
prevent swallowing monster ending up in a solid wall if it killed vault guard
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

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 */