]> granicus.if.org Git - nethack/commitdiff
Fix fired iron ball sanity error
authorPasi Kallinen <paxed@alt.org>
Fri, 11 Oct 2019 17:00:17 +0000 (20:00 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 11 Oct 2019 17:02:06 +0000 (20:02 +0300)
When hero was punished and swallowed, and fired the attached
iron ball from a quiver, thrownobj was not cleared.

doc/fixes36.3
src/dothrow.c

index 49c49674c13dc8de9c89d78605f199a4990be5c3..c62dfc1d1a32c553b8550f765ef38fd200923fea 100644 (file)
@@ -178,6 +178,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or
        wasn't possible to tell where they were, unlike all other forms of
        multiple movement; stop running if/when an engraving is reached
 fix exploding land mine moving ball or chain and causing a sanity error
+fix firing attached iron ball when swallowed causing a sanity error
 
 
 Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
index a2d12c93a8043b06f65654a0cd12eacd893f81bd..1b2a8018490f2944633a7dcb6eac593e786bdaf1 100644 (file)
@@ -1294,7 +1294,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
                 || !index(in_rooms(mon->mx, mon->my, SHOPBASE), *u.ushops)))
             hot_pursuit(mon);
 
-        if (obj_gone)
+        if (obj_gone || obj == uball)
             thrownobj = (struct obj *) 0;
     }