]> granicus.if.org Git - nethack/commitdiff
Fix hero hiding under a statue shattered by land mine
authorPasi Kallinen <paxed@alt.org>
Sun, 13 Oct 2019 16:16:38 +0000 (19:16 +0300)
committerPasi Kallinen <paxed@alt.org>
Sun, 13 Oct 2019 16:30:32 +0000 (19:30 +0300)
Trigger a land mine while being polymorphed into a monster that
automatically hides (eg. scorpion). Have the statue on the land mine
shatter and all items on that square scatter away. Avoid falling
into the pit left by the land mine.

doc/fixes36.3
src/explode.c

index a2467729c995173175bff199dd0ec87dae87b171..8182bfea8a6c1fbab1c89f6272e2eb25b8edec31 100644 (file)
@@ -181,6 +181,7 @@ fix exploding land mine moving ball or chain and causing a sanity error
 fix firing attached iron ball when swallowed causing a sanity error
 fix vault guard impossible when he could not relocate in certain situation
 fix temple priests or shopkeepers moving over other monsters
+fix hero still hiding under a statue shattered by a land mine
 
 
 Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
index 2c46178fd7eea4bd757f9527b46d7f26f1761cf7..31ba7c7632c575991ee2c92dee9f96da9a022a53 100644 (file)
@@ -771,6 +771,9 @@ struct obj *obj; /* only scatter this obj        */
         newsym(x, y);
     }
     newsym(sx, sy);
+    if (sx == u.ux && sy == u.uy && u.uundetected
+        && hides_under(youmonst.data))
+        (void) hideunder(&youmonst);
     return total;
 }