inappropriate 'object 0' in makemon()

This commit is contained in:
PatR
2023-09-21 13:23:15 -07:00
parent 49c7a136c8
commit b6c942d062
+3 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 makemon.c $NHDT-Date: 1651886995 2022/05/07 01:29:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.204 $ */ /* NetHack 3.7 makemon.c $NHDT-Date: 1695327268 2023/09/21 20:14:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.227 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1319,7 +1319,7 @@ makemon(
if ((ct = emits_light(mtmp->data)) > 0) if ((ct = emits_light(mtmp->data)) > 0)
new_light_source(mtmp->mx, mtmp->my, ct, LS_MONSTER, new_light_source(mtmp->mx, mtmp->my, ct, LS_MONSTER,
monst_to_any(mtmp)); monst_to_any(mtmp));
mitem = 0; /* extra inventory item for this monster */ mitem = STRANGE_OBJECT; /* extra inventory item for this monster */
if (mndx == PM_VLAD_THE_IMPALER) if (mndx == PM_VLAD_THE_IMPALER)
mitem = CANDELABRUM_OF_INVOCATION; mitem = CANDELABRUM_OF_INVOCATION;
@@ -1351,7 +1351,7 @@ makemon(
} else if (mndx == PM_PESTILENCE) { } else if (mndx == PM_PESTILENCE) {
mitem = POT_SICKNESS; mitem = POT_SICKNESS;
} }
if (mitem && allow_minvent) if (mitem != STRANGE_OBJECT && allow_minvent)
(void) mongets(mtmp, mitem); (void) mongets(mtmp, mitem);
if (gi.in_mklev) { if (gi.in_mklev) {