- Blood: Fix for buried zombies losing their targeting ability when being struck down while rising from the grave.

Normally they change their type when being fully risen - but when attacked before that happens, never reach that code. To keep them functional, the change must be performed before performing the first target check in thinkChase.
This commit is contained in:
Christoph Oelckers 2020-02-15 21:47:02 +01:00
parent cc872c79fc
commit 26d4114566

View file

@ -150,6 +150,10 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
aiNewState(pSprite, pXSprite, &zombieAGoto); aiNewState(pSprite, pXSprite, &zombieAGoto);
return; return;
} }
// If the zombie gets whacked while rising from the grave it never executes this change and if it isn't done here at the very latest, will just aimlessly run around.
if (!VanillaMode() && pSprite->type == kDudeZombieAxeBuried)
pSprite->type = kDudeZombieAxeNormal;
int nDist = approxDist(dx, dy); int nDist = approxDist(dx, dy);
if (nDist <= pDudeInfo->seeDist) if (nDist <= pDudeInfo->seeDist)
{ {