mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
Increase step up with water-running just like water-skipping
This commit is contained in:
parent
ce366099b0
commit
f2e8d7d469
1 changed files with 15 additions and 1 deletions
16
src/p_map.c
16
src/p_map.c
|
|
@ -2414,6 +2414,20 @@ boolean PIT_PushableMoved(mobj_t *thing)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean P_WaterRunning(mobj_t *thing)
|
||||||
|
{
|
||||||
|
ffloor_t *rover = thing->floorrover;
|
||||||
|
return rover && (rover->flags & FF_SWIMMABLE) &&
|
||||||
|
P_IsObjectOnGround(thing);
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean P_WaterStepUp(mobj_t *thing)
|
||||||
|
{
|
||||||
|
player_t *player = thing->player;
|
||||||
|
return (player && player->waterskip) ||
|
||||||
|
P_WaterRunning(thing);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_TryMove
|
// P_TryMove
|
||||||
// Attempt to move to a new position.
|
// Attempt to move to a new position.
|
||||||
|
|
@ -2478,7 +2492,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
||||||
const fixed_t maxstepmove = FixedMul(MAXSTEPMOVE, mapobjectscale);
|
const fixed_t maxstepmove = FixedMul(MAXSTEPMOVE, mapobjectscale);
|
||||||
fixed_t maxstep = maxstepmove;
|
fixed_t maxstep = maxstepmove;
|
||||||
|
|
||||||
if (thing->player && thing->player->waterskip)
|
if (thing->player && P_WaterStepUp(thing))
|
||||||
maxstep += maxstepmove; // Add some extra stepmove when waterskipping
|
maxstep += maxstepmove; // Add some extra stepmove when waterskipping
|
||||||
|
|
||||||
// If using type Section1:13, double the maxstep.
|
// If using type Section1:13, double the maxstep.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue