Browse Source

[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
pull/982/head
Anders Jenbo 5 years ago
parent
commit
9cd6bd96a9
  1. 24
      Source/monster.cpp
  2. 2
      Source/trigs.cpp

24
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)

2
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;

Loading…
Cancel
Save