From d088795f28e55e3ae3dbb3627e1ff9476fc4b48e Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 10 May 2020 17:06:12 +1000 Subject: [PATCH] Revert "Duke3D: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate." This reverts commit 6dcd83b73487948b14220df4f340c39d7e76c34c. --- source/duke3d/src/player.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index b94224da5..7eae47504 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -3322,21 +3322,6 @@ void P_GetInput(int const playerNum) } } - if (pPlayer->return_to_center > 0) - pPlayer->return_to_center--; - - if (pPlayer->hard_landing) - { - pPlayer->return_to_center = 9; - thisPlayer.horizRecenter = true; - } - - if (pPlayer->hard_landing > 0) - { - thisPlayer.horizSkew = fix16_from_int(-(pPlayer->hard_landing << 4)); - pPlayer->hard_landing--; - } - // A horiz diff of 128 equal 45 degrees, so we convert horiz to 1024 angle units if (thisPlayer.horizAngleAdjust) @@ -5712,7 +5697,10 @@ RECHECK: G_ActivateBySector(pPlayer->cursectnum, pPlayer->i); } - if (TEST_SYNC_KEY(playerBits, SK_CENTER_VIEW)) + if (pPlayer->return_to_center > 0) + pPlayer->return_to_center--; + + if (TEST_SYNC_KEY(playerBits, SK_CENTER_VIEW) || pPlayer->hard_landing) if (VM_OnEvent(EVENT_RETURNTOCENTER, pPlayer->i,playerNum) == 0) { pPlayer->return_to_center = 9; @@ -5757,6 +5745,12 @@ RECHECK: } } + if (pPlayer->hard_landing > 0) + { + thisPlayer.horizSkew = fix16_from_int(-(pPlayer->hard_landing << 4)); + pPlayer->hard_landing--; + } + //Shooting code/changes if (pPlayer->show_empty_weapon > 0)