- 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…
Add table
Add a link
Reference in a new issue