diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 71e0a2512..b614a25f2 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -2253,7 +2253,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz) mo->HitFloor (); if (mo->player) { - if (mo->player->jumpTics != 0 && mo->velz < -grav*4) + if (mo->player->jumpTics < 0 || mo->velz < minvel) { // delay any jumping for a short while mo->player->jumpTics = 7; } diff --git a/src/p_user.cpp b/src/p_user.cpp index e844d2680..f80ddb9ae 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -2156,7 +2156,7 @@ void P_PlayerThink (player_t *player) P_DeathThink (player); return; } - if (player->jumpTics) + if (player->jumpTics > 0) { player->jumpTics--; } @@ -2217,7 +2217,7 @@ void P_PlayerThink (player_t *player) // [RH] check for jump if (cmd->ucmd.buttons & BT_JUMP) { - if (player->crouchoffset!=0) + if (player->crouchoffset != 0) { // Jumping while crouching will force an un-crouch but not jump player->crouching = 1; @@ -2231,7 +2231,7 @@ void P_PlayerThink (player_t *player) { player->mo->velz = 3*FRACUNIT; } - else if (level.IsJumpingAllowed() && onground && !player->jumpTics) + else if (level.IsJumpingAllowed() && onground && player->jumpTics == 0) { fixed_t jumpvelz = player->mo->JumpZ * 35 / TICRATE; @@ -2241,7 +2241,7 @@ void P_PlayerThink (player_t *player) player->mo->velz += jumpvelz; S_Sound (player->mo, CHAN_BODY, "*jump", 1, ATTN_NORM); player->mo->flags2 &= ~MF2_ONMOBJ; - player->jumpTics = 18*TICRATE/35; + player->jumpTics = -1; } }