mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Water-run if you are above 100% speed and would cross a tripwire
This commit is contained in:
parent
9bde266f9f
commit
a7a572a7ea
1 changed files with 2 additions and 3 deletions
|
|
@ -2947,7 +2947,6 @@ boolean P_SceneryZMovement(mobj_t *mo)
|
||||||
boolean P_CanRunOnWater(player_t *player, ffloor_t *rover)
|
boolean P_CanRunOnWater(player_t *player, ffloor_t *rover)
|
||||||
{
|
{
|
||||||
boolean flip = player->mo->eflags & MFE_VERTICALFLIP;
|
boolean flip = player->mo->eflags & MFE_VERTICALFLIP;
|
||||||
fixed_t topspeed = K_GetKartSpeed(player, false);
|
|
||||||
fixed_t surfaceheight = flip ? player->mo->waterbottom : player->mo->watertop;
|
fixed_t surfaceheight = flip ? player->mo->waterbottom : player->mo->watertop;
|
||||||
fixed_t playerbottom = flip ? (player->mo->z + player->mo->height) : player->mo->z;
|
fixed_t playerbottom = flip ? (player->mo->z + player->mo->height) : player->mo->z;
|
||||||
fixed_t clip = flip ? (surfaceheight - playerbottom) : (playerbottom - surfaceheight);
|
fixed_t clip = flip ? (surfaceheight - playerbottom) : (playerbottom - surfaceheight);
|
||||||
|
|
@ -2957,8 +2956,8 @@ boolean P_CanRunOnWater(player_t *player, ffloor_t *rover)
|
||||||
clip > -(player->mo->height / 2) &&
|
clip > -(player->mo->height / 2) &&
|
||||||
span > player->mo->height &&
|
span > player->mo->height &&
|
||||||
player->speed / 3 > abs(player->mo->momz) &&
|
player->speed / 3 > abs(player->mo->momz) &&
|
||||||
(player->speed > 2 * topspeed || (player->speed >
|
player->speed > K_GetKartSpeed(player, false) &&
|
||||||
topspeed && K_SlopeResistance(player))) &&
|
K_TripWirePass(player) &&
|
||||||
(rover->flags & FF_SWIMMABLE);
|
(rover->flags & FF_SWIMMABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue