]> granicus.if.org Git - nethack/commitdiff
fix recent bypass of obj placement
authornhmall <nhmall@nethack.org>
Tue, 22 Oct 2019 13:40:10 +0000 (09:40 -0400)
committernhmall <nhmall@nethack.org>
Tue, 22 Oct 2019 13:40:10 +0000 (09:40 -0400)
src/dothrow.c

index 1b2a8018490f2944633a7dcb6eac593e786bdaf1..827cdca736751830f243123dcc76cfb757e55434 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 || obj == uball)
+        if (obj_gone)
             thrownobj = (struct obj *) 0;
     }
 
@@ -1306,6 +1306,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
  swallowit:
         if (obj != uball)
             (void) mpickobj(u.ustuck, obj); /* clears 'thrownobj' */
+        else
+            clear_thrownobj = TRUE;
         goto throwit_return;
     } else {
         /* Mjollnir must we wielded to be thrown--caller verifies this;