Allow fastfall out of water run

This commit is contained in:
AJ Martinez 2024-01-19 20:26:06 -07:00
parent 8f320b6ac2
commit 3a305be3cd
2 changed files with 16 additions and 0 deletions

View file

@ -2983,6 +2983,12 @@ boolean K_WaterSkip(mobj_t *mobj)
// Don't allow // Don't allow
return false; return false;
} }
if (K_PlayerEBrake(mobj->player))
{
return false;
}
// Allow // Allow
break; break;
} }

View file

@ -3358,6 +3358,16 @@ boolean P_CanRunOnWater(mobj_t *mobj, ffloor_t *rover)
} }
} }
// E-brake during water-run forces a fastfall.
// We disable the ebrake input safety to do this, so we've gotta check it as late as
// possible: otherwise, this would cause misinput fastfall or underwater twerking.
if (mobj->player != NULL && K_PlayerEBrake(mobj->player))
{
if (P_IsObjectOnGround(mobj) && !mobj->player->fastfall)
mobj->player->pflags &= ~PF_NOFASTFALL;
return false;
}
return true; return true;
} }