]> granicus.if.org Git - nethack/commitdiff
Fix: invisible pudding globs
authorMichael Meyer <me@entrez.cc>
Wed, 25 May 2022 17:24:47 +0000 (13:24 -0400)
committerPatR <rankin@nethack.org>
Wed, 25 May 2022 19:34:59 +0000 (12:34 -0700)
When a pudding was killed by a monster (player-caused deaths were exempt
because of a 'backup' newsym call in xkilled), and the resulting glob
ended up on the pudding's square (whether because there were no adjacent
globs, or because the adjacent glob merged into the new one rather than
vice-versa), the glob wouldn't be drawn onto the map until the squre was
redrawn with ^R or similar.  This was because the early return for globs
in make_corpse skipped the typical newsym call near the end of the
function.

In this commit I just added a newsym call to the glob case in
make_corpse, but adding a newsym call to monkilled as a guard against
similar cases (equivalent to the one in xkilled) seems like a possible
extension.  I wasn't sure if there's a particular reason it's not
included in monkilled, so I didn't mess with it.

src/mon.c

index 8dbd1eba7bab42950c42dd60157e46ae22f99cc4..1ebb84964f080ee81b25492e2ba72f984a6e8a9e 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -651,9 +651,10 @@ make_corpse(struct monst *mtmp, unsigned int corpseflags)
             obj = obj_meld(&obj, &otmp);
         }
         free_mgivenname(mtmp);
+        newsym(x, y);
         return obj;
     default:
- default_1:
+default_1:
         if (g.mvitals[mndx].mvflags & G_NOCORPSE) {
             return (struct obj *) 0;
         } else {