mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 09:11:17 +00:00
- 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)
This commit is contained in:
parent
0ca693771b
commit
4c5edf00b0
1 changed files with 7 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue