mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Revised usage of jumpTics. In Hexen, it went like this:
* When you jump, it gets set to 18. * When you land, it gets set to 7. * As long as it is non-zero, it counts down, and you cannot jump. Of note here, is that setting it to 18 upon jumping seems useless, since you can't jump unless you're on the ground, and when you reach the ground, it will always be set to 7. With that in mind, the new behavior is: * When you jump, it gets set to -1. * When you land, if it is less than zero or you fall far enough to squat, jumpTics will be set to 7. Otherwise, jumpTics is left alone. * If jumpTics is positive, it will count down each tic. * As long as JumpTics is non-zero, you cannot jump. SVN r2970 (trunk)
This commit is contained in:
parent
48e17ccf1c
commit
92d11da8a5
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue