From b678b320af47109327493715587632364e35c13b Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 9 Jan 2024 23:45:00 -0800 Subject: [PATCH] Fix Banana not checking for water state --- src/p_mobj.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 689970281..2e2bafc31 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1048,6 +1048,20 @@ static void P_PlayerFlip(mobj_t *mo) // Flip aiming to match! } +static boolean P_UseUnderwaterGravity(mobj_t *mo) +{ + switch (mo->type) + { + case MT_BANANA: + return false; + + default: + break; + } + + return true; +} + // // P_GetMobjGravity // @@ -1106,7 +1120,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo) } // Less gravity underwater. - if ((mo->eflags & MFE_UNDERWATER) && !goopgravity) + if ((mo->eflags & MFE_UNDERWATER) && !goopgravity && P_UseUnderwaterGravity(mo)) { if (mo->momz * P_MobjFlip(mo) <= 0) { @@ -7601,6 +7615,8 @@ static boolean P_MobjRegularThink(mobj_t *mobj) mobj->rollangle -= spin; } + P_MobjCheckWater(mobj); + if (mobj->threshold > 0) mobj->threshold--; break;