From 4c5edf00b00db48c7d3a59a264b6dc94fa2246ae Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 22 Mar 2010 22:02:31 +0000 Subject: [PATCH] - P_ZMovement() temporarily disables jumping after a landing. Don't do this if the jump timer is already running or for short falls (e.g. along the edges of slopes, since the slope floorz calculation is pretty crappy.) SVN r2238 (trunk) --- src/p_mobj.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 8fa00645f..8332d489d 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -2132,8 +2132,9 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz) { fixed_t dist; fixed_t delta; - fixed_t oldz = mo->z; - + fixed_t oldz = mo->z; + fixed_t grav = mo->GetGravity(); + // // check for smooth step up // @@ -2158,8 +2159,6 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz) if (!mo->waterlevel || mo->flags & MF_CORPSE || (mo->player && !(mo->player->cmd.ucmd.forwardmove | mo->player->cmd.ucmd.sidemove))) { - fixed_t grav = mo->GetGravity(); - // [RH] Double gravity only if running off a ledge. Coming down from // an upward thrust (e.g. a jump) should not double it. if (mo->velz == 0 && oldfloorz > mo->floorz && mo->z == oldfloorz) @@ -2295,7 +2294,10 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz) mo->HitFloor (); if (mo->player) { - mo->player->jumpTics = 7; // delay any jumping for a short while + if (mo->player->jumpTics != 0 && mo->velz < -grav*4) + { // delay any jumping for a short while + mo->player->jumpTics = 7; + } if (mo->velz < minvel && !(mo->flags & MF_NOGRAVITY)) { // Squat down.