Skip to content

Commit

Permalink
Shift check for thing in liquid sector in P_ZMovement()
Browse files Browse the repository at this point in the history
To handle instance where a cacodemon is touching liquid sector and floats upward with no x/y momentum.
  • Loading branch information
bradharding committed Jan 10, 2025
1 parent c5eaa49 commit 6711a19
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,6 @@ static void P_ZMovement(mobj_t *mo)
return;
}

if ((mo->flags2 & MF2_FOOTCLIP) && P_IsInLiquid(mo))
mo->flags2 |= MF2_FEETARECLIPPED;
else
mo->flags2 &= ~MF2_FEETARECLIPPED;

// hit the floor
if (flags & MF_SKULLFLY)
mo->momz = -mo->momz; // the skull slammed into something
Expand Down Expand Up @@ -553,6 +548,11 @@ static void P_ZMovement(mobj_t *mo)
mo->momz -= GRAVITY;
}

if ((mo->flags2 & MF2_FOOTCLIP) && P_IsInLiquid(mo))
mo->flags2 |= MF2_FEETARECLIPPED;
else
mo->flags2 &= ~MF2_FEETARECLIPPED;

if (mo->z + mo->height > mo->ceilingz)
{
if (flags & MF_SKULLFLY)
Expand Down

0 comments on commit 6711a19

Please sign in to comment.