Don't trigger fall scream after player has died

This commit is contained in:
carnivoroussociety 2021-08-16 02:45:25 +10:00 committed by Christoph Oelckers
parent 7ac662e0c8
commit a29303cde5

View file

@ -5010,10 +5010,14 @@ void MoveDude(spritetype *pSprite)
}
}
if (pPlayer && zvel[nSprite] > 0x155555 && !pPlayer->fallScream && pXSprite->height > 0)
{
const bool playerAlive = (pXSprite->health > 0) || VanillaMode() || DemoRecordStatus(); // only trigger falling scream if player is alive
if (playerAlive)
{
pPlayer->fallScream = 1;
sfxPlay3DSound(pSprite, 719, 0, 0);
}
}
vec3_t const oldpos = pSprite->pos;
int nLink = CheckLink(pSprite);
if (nLink)