From f2e8d7d469128efa5db3ee5f53436fd2edca337b Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 7 Dec 2021 16:26:52 -0800 Subject: [PATCH] Increase step up with water-running just like water-skipping --- src/p_map.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index f78a0b402..bcecb1dfa 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2414,6 +2414,20 @@ boolean PIT_PushableMoved(mobj_t *thing) 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 // 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); fixed_t maxstep = maxstepmove; - if (thing->player && thing->player->waterskip) + if (thing->player && P_WaterStepUp(thing)) maxstep += maxstepmove; // Add some extra stepmove when waterskipping // If using type Section1:13, double the maxstep.