From a0c912ef2db329f467296d3722320d846b62d80c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 22 Jun 2006 09:36:48 +0000 Subject: [PATCH] - Fixed: Jumping and crouching at the same time created jerky results. Now jumping takes precedence and you can't crouch while pressing the jump key (which causes an uncrouch.) SVN r213 (trunk) --- docs/rh-log.txt | 5 +++++ src/d_net.cpp | 3 ++- src/p_user.cpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9fed896cc2..1d6e0722db 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +June 22, 2006 (Changes by Graf Zahl) +- Fixed: Jumping and crouching at the same time created jerky results. + Now jumping takes precedence and you can't crouch while pressing the + jump key (which causes an uncrouch.) + June 21, 2006 - Fixed: DF_NO_COOP_WEAPON_SPAWN was handled backwardly. - Fixed: G_InitLevelLocals() needs to OR in the crouching bits, otherwise it diff --git a/src/d_net.cpp b/src/d_net.cpp index a77b2493e5..a48efe3578 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2255,7 +2255,8 @@ void Net_DoCommand (int type, byte **stream, int player) break; case DEM_CROUCH: - if (gamestate == GS_LEVEL && players[player].mo != NULL && players[player].health > 0) + if (gamestate == GS_LEVEL && players[player].mo != NULL && + players[player].health > 0 && !(players[player].oldbuttons & BT_JUMP)) { players[player].crouching = players[player].crouchdir<0? 1 : -1; } diff --git a/src/p_user.cpp b/src/p_user.cpp index 23d6b8559a..bae6b97230 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1422,6 +1422,7 @@ void P_PlayerThink (player_t *player) } // Handle crouching + if (player->cmd.ucmd.buttons & BT_JUMP) player->cmd.ucmd.buttons &= ~BT_DUCK; if (player->morphTics == 0 && player->health > 0 && !(dmflags & DF_NO_CROUCH)) { if (!(player->cheats & CF_TOTALLYFROZEN))