mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
Fix Banana not checking for water state
This commit is contained in:
parent
4f56006cc8
commit
b678b320af
1 changed files with 17 additions and 1 deletions
18
src/p_mobj.c
18
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue