diff --git a/src/k_kart.c b/src/k_kart.c index 40d1ff0a2..6bb2be28e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3445,6 +3445,8 @@ boolean K_WaterRun(mobj_t *mobj) case MT_PLAYER: { + fixed_t minspeed = 0; + if (mobj->player == NULL) { return false; @@ -3455,11 +3457,18 @@ boolean K_WaterRun(mobj_t *mobj) return K_IsHoldingDownTop(mobj->player) == false; } + minspeed = 2 * K_GetKartSpeed(mobj->player, false, false); // 200% + + if (mobj->player->speed < minspeed / 5) // 40% + { + return false; + } + if (mobj->player->invincibilitytimer || mobj->player->sneakertimer || mobj->player->tiregrease || mobj->player->flamedash - || mobj->player->speed > 2 * K_GetKartSpeed(mobj->player, false, false)) + || mobj->player->speed > minspeed) { return true; } @@ -10362,6 +10371,9 @@ boolean K_FastFallBounce(player_t *player) } } + if (player->mo->eflags & MFE_UNDERWATER) + bounce = (117 * bounce) / 200; + S_StartSound(player->mo, sfx_ffbonc); player->mo->momz = bounce * P_MobjFlip(player->mo); diff --git a/src/p_mobj.c b/src/p_mobj.c index eaa5b058c..250b8b470 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3222,14 +3222,15 @@ boolean P_CanRunOnWater(mobj_t *mobj, ffloor_t *rover) // We start water run IF we can step onto it! if (surfDiff <= maxStep && surfDiff >= 0) { - if (ourZAng < 0) + pslope_t *groundSlope = (flip ? mobj->subsector->sector->c_slope : mobj->subsector->sector->f_slope); + if (groundSlope != NULL && groundSlope->zangle != 0) { fixed_t floorheight = flip ? P_GetSectorCeilingZAt(mobj->subsector->sector, mobj->x, mobj->y) : P_GetSectorFloorZAt(mobj->subsector->sector, mobj->x, mobj->y); fixed_t floorDiff = flip ? (floorheight - mobjbottom) : (mobjbottom - floorheight); if (floorDiff <= maxStep && floorDiff >= -maxStep) { - // ... but NOT if going down and real floor is in range. - // FIXME: Count solid FOFs in this check + // ... but NOT if downward-sloping real floor is in range. + // FIXME: Count solid FOFs in these checks return false; } }