From f3bf2f4f0513fade4ab5df6becbae9d4e39835aa Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 14 Jan 2021 11:08:23 +0100 Subject: [PATCH] [hellfire] M_TryM2MHit --- Source/monster.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/monster.cpp b/Source/monster.cpp index d5580e462..37ddff576 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -2511,10 +2511,18 @@ void M_TryM2MHit(int i, int mid, int hper, int mind, int maxd) BOOL ret; if ((DWORD)mid >= MAXMONSTERS) { +#ifdef HELLFIRE + return; +#else app_fatal("M_TryM2MHit: Invalid monster %d", mid); +#endif } if (monster[mid].MType == NULL) +#ifdef HELLFIRE + return; +#else app_fatal("M_TryM2MHit: Monster %d \"%s\" MType NULL", mid, monster[mid].mName); +#endif if (monster[mid]._mhitpoints >> 6 > 0 && (monster[mid].MType->mtype != MT_ILLWEAV || monster[mid]._mgoal != MGOAL_RETREAT)) { int hit = random_(4, 100); if (monster[mid]._mmode == MM_STONE)