]> granicus.if.org Git - nethack/commitdiff
Clear thrownobj when punished and swallowed
authorPasi Kallinen <paxed@alt.org>
Thu, 12 Nov 2015 22:07:43 +0000 (00:07 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 12 Nov 2015 22:07:47 +0000 (00:07 +0200)
As per Pat's suggestion, this actually does work correctly;
I have no idea why I thought it didn't ...

src/dothrow.c

index 7c83a62473eef57a1dd3513f3ba2e954e3d42ce3..8de02854d4802e5dc256985259a8bf450e0e0a6a 100644 (file)
@@ -1161,10 +1161,9 @@ boolean
         ; /* missile has already been handled */
     } else if (u.uswallow) {
         /* ball is not picked up by monster */
-        if (obj != uball) {
+        if (obj != uball)
             (void) mpickobj(u.ustuck, obj);
-            thrownobj = (struct obj *) 0;
-        }
+        thrownobj = (struct obj *) 0;
     } else {
         /* the code following might become part of dropy() */
         if (obj->oartifact == ART_MJOLLNIR && Role_if(PM_VALKYRIE)