Fix gravfix (fixes #124)

This commit is contained in:
NepDisk 2025-09-24 09:53:34 -04:00
parent 1cc556ade9
commit c427ef90fa

View file

@ -1160,6 +1160,13 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
if (mo->player)
{
// MF2_OBJECTFLIP is relative -- flips sector reverse gravity back to normal
if (mo->flags2 & MF2_OBJECTFLIP)
{
gravityadd = -gravityadd;
mo->eflags ^= MFE_VERTICALFLIP;
}
if (wasflip == !(mo->eflags & MFE_VERTICALFLIP)) // note!! == ! is not equivalent to != here - turns numeric into bool this way
P_PlayerFlip(mo);