mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 16:11:23 +00:00
- fixed crash on player unmorph after falling death
Rearranged conditions to avoid accessing player from obsolete morphed pawn Unmorphing upon death resets player in morphed actor, so player alive state should be tested first Removed duplicate health check as well https://forum.zdoom.org/viewtopic.php?t=65429
This commit is contained in:
parent
7e71532ccc
commit
435f0bb0b0
1 changed files with 2 additions and 2 deletions
|
@ -2780,11 +2780,11 @@ static void PlayerLandedOnThing (AActor *mo, AActor *onmobj)
|
|||
P_FallingDamage (mo);
|
||||
|
||||
// [RH] only make noise if alive
|
||||
if (!mo->player->morphTics && mo->health > 0)
|
||||
if (mo->health > 0 && !mo->player->morphTics)
|
||||
{
|
||||
grunted = false;
|
||||
// Why should this number vary by gravity?
|
||||
if (mo->health > 0 && mo->Vel.Z < -mo->player->mo->FloatVar(NAME_GruntSpeed))
|
||||
if (mo->Vel.Z < -mo->player->mo->FloatVar(NAME_GruntSpeed))
|
||||
{
|
||||
S_Sound (mo, CHAN_VOICE, "*grunt", 1, ATTN_NORM);
|
||||
grunted = true;
|
||||
|
|
Loading…
Reference in a new issue