Merge branch 'fastfall-waterski-legends' into 'master'

Allow fastfall out of water run (resolves #902)

Closes #902

See merge request KartKrew/Kart!1858
This commit is contained in:
Oni 2024-01-25 14:42:53 +00:00
commit 5102ecab56
2 changed files with 16 additions and 0 deletions

View file

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

View file

@ -3363,6 +3363,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;
}