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) { if (dDead[Monst->_mx][Monst->_my] != 0) {
M_StartEat(i); M_StartEat(i);
if (!(Monst->_mFlags & MFLAG_NOHEAL)) { if (!(Monst->_mFlags & MFLAG_NOHEAL)) {
#ifdef HELLFIRE if (gbIsHellfire) {
int mMaxHP = Monst->MType->mMaxHP << 6; // BUGFIX use _mmaxhp or we loose health when difficulty isn't normal int mMaxHP = Monst->_mmaxhp; // BUGFIX use _mmaxhp or we loose health when difficulty isn't normal (fixed)
if (gbMaxPlayers == 1) Monst->_mhitpoints += mMaxHP >> 3;
mMaxHP >>= 1; if (Monst->_mhitpoints > Monst->_mmaxhp)
Monst->_mhitpoints += mMaxHP >> 3; Monst->_mhitpoints = Monst->_mmaxhp;
if (Monst->_mhitpoints > mMaxHP) if (Monst->_mgoalvar3 <= 0 || Monst->_mhitpoints == Monst->_mmaxhp)
Monst->_mhitpoints = mMaxHP; dDead[Monst->_mx][Monst->_my] = 0;
if (Monst->_mmaxhp < Monst->_mhitpoints) } else {
Monst->_mmaxhp = Monst->_mhitpoints; Monst->_mhitpoints += 64;
if (Monst->_mgoalvar3 <= 0 || Monst->_mhitpoints == mMaxHP) }
dDead[Monst->_mx][Monst->_my] = 0;
#else
Monst->_mhitpoints += 64;
#endif
} }
int targetHealth = Monst->_mmaxhp; int targetHealth = Monst->_mmaxhp;
if (!gbIsHellfire) if (!gbIsHellfire)

2
Source/trigs.cpp

@ -67,7 +67,7 @@ void InitTownTriggers()
trigs[numtrigs]._tmsg = WM_DIABNEXTLVL; trigs[numtrigs]._tmsg = WM_DIABNEXTLVL;
numtrigs++; numtrigs++;
bool isMultiplayer = gbMaxPlayers == MAX_PLRS; bool isMultiplayer = gbMaxPlayers != 1;
for (i = 0; i < sizeof(townwarps) / sizeof(townwarps[0]); i++) { for (i = 0; i < sizeof(townwarps) / sizeof(townwarps[0]); i++) {
townwarps[i] = isMultiplayer && !gbIsSpawn; townwarps[i] = isMultiplayer && !gbIsSpawn;

Loading…
Cancel
Save