]> granicus.if.org Git - nethack/commitdiff
more duplicate gold
authornethack.rankin <nethack.rankin>
Thu, 21 Apr 2005 05:27:15 +0000 (05:27 +0000)
committernethack.rankin <nethack.rankin>
Thu, 21 Apr 2005 05:27:15 +0000 (05:27 +0000)
     My previous fix (trap.c) prevented the panic, but didn't actually stop
gold possessed by a reanimated statue from doubling.  That problem was due
to how the monster info was saved rather than to how it was restored.
The previous fixes entry applies.

src/mkobj.c

index ec635534b434013aff6a2fdf67128dc18909c079..9c1be2b580ed6bc94c3aa7b88ed81bf9ad35f869 100644 (file)
@@ -1084,6 +1084,10 @@ struct monst *mtmp;
                mtmp2->nmon     = (struct monst *)0;
                mtmp2->data     = (struct permonst *)0;
                mtmp2->minvent  = (struct obj *)0;
+#ifndef GOLDOBJ
+               /* not a pointer but is discarded along with minvent */
+               mtmp2->mgold    = 0L;
+#endif
                otmp->oattached = OATTACHED_MONST;      /* mark it */
        }
        return otmp;