From 9cd6bd96a95413c7c03f429222d79b31dc0b60fd Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 17 Jan 2021 19:52:31 +0100 Subject: [PATCH] [hellfire] Fix monster eating logic - Nolonger drop health when not on normal difficulty - Uniques will nolonger drop health - All monsters heal at the same rate --- Source/monster.cpp | 24 ++++++++++-------------- Source/trigs.cpp | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index 76d59f48c..fd59c542b 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3783,20 +3783,16 @@ void MAI_Scav(int i) if (dDead[Monst->_mx][Monst->_my] != 0) { M_StartEat(i); if (!(Monst->_mFlags & MFLAG_NOHEAL)) { -#ifdef HELLFIRE - int mMaxHP = Monst->MType->mMaxHP << 6; // BUGFIX use _mmaxhp or we loose health when difficulty isn't normal - if (gbMaxPlayers == 1) - mMaxHP >>= 1; - Monst->_mhitpoints += mMaxHP >> 3; - if (Monst->_mhitpoints > mMaxHP) - Monst->_mhitpoints = mMaxHP; - if (Monst->_mmaxhp < Monst->_mhitpoints) - Monst->_mmaxhp = Monst->_mhitpoints; - if (Monst->_mgoalvar3 <= 0 || Monst->_mhitpoints == mMaxHP) - dDead[Monst->_mx][Monst->_my] = 0; -#else - Monst->_mhitpoints += 64; -#endif + if (gbIsHellfire) { + int mMaxHP = Monst->_mmaxhp; // BUGFIX use _mmaxhp or we loose health when difficulty isn't normal (fixed) + Monst->_mhitpoints += mMaxHP >> 3; + if (Monst->_mhitpoints > Monst->_mmaxhp) + Monst->_mhitpoints = Monst->_mmaxhp; + if (Monst->_mgoalvar3 <= 0 || Monst->_mhitpoints == Monst->_mmaxhp) + dDead[Monst->_mx][Monst->_my] = 0; + } else { + Monst->_mhitpoints += 64; + } } int targetHealth = Monst->_mmaxhp; if (!gbIsHellfire) diff --git a/Source/trigs.cpp b/Source/trigs.cpp index 79a4b2cda..fe3a0b870 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -67,7 +67,7 @@ void InitTownTriggers() trigs[numtrigs]._tmsg = WM_DIABNEXTLVL; numtrigs++; - bool isMultiplayer = gbMaxPlayers == MAX_PLRS; + bool isMultiplayer = gbMaxPlayers != 1; for (i = 0; i < sizeof(townwarps) / sizeof(townwarps[0]); i++) { townwarps[i] = isMultiplayer && !gbIsSpawn;