mons[NUMMONS] tweak

Add a couple of non-zero permonst flags to the terminator at the end
of mons[] in case some code using a pointer to mons[NUMMONS] for "not
a monster" unexpectedly references them.

Also, eliminate some obsolete handling for conditional color support
from monst.c.
This commit is contained in:
PatR
2024-01-12 12:42:44 -08:00
parent 4609f23332
commit df6e67f178
2 changed files with 29 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 monsters.h $NHDT-Date: 1703845746 2023/12/29 10:29:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.117 $ */
/* NetHack 3.7 monsters.h $NHDT-Date: 1705092146 2024/01/12 20:42:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.119 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -3351,6 +3351,12 @@
| M2_STRONG | M2_COLLECT | M2_MAGIC,
M3_INFRAVISIBLE, 8, HI_DOMESTIC, APPRENTICE),
/*
* mons_init() in monst.c adds a terminator here, mons[NUMMONS].
* It is part of the mons[] array without introducing another type
* of monster.
*/
#if defined(MONS_ENUM) || defined(DUMP_ENUMS)
#undef MON
#undef MON3