From 1daa346fdded1aad3a1f983ab085fae54b993608 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 19 Apr 2021 20:23:22 +1000 Subject: [PATCH] - Exhumed: Make `SB_CENTERVIEW` work properly when `cl_syncinput 1` is set. --- source/games/exhumed/src/player.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index 547abc038..1f02a17f3 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -2638,7 +2638,12 @@ loc_1BD2E: Player* pPlayer = &PlayerList[nPlayer]; - if (actions & (SB_LOOK_UP | SB_LOOK_DOWN)) + if (SyncInput()) + { + sethorizon(&pPlayer->horizon, sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions); + } + + if (actions & (SB_LOOK_UP | SB_LOOK_DOWN) || sPlayerInput[nPlayer].pan) { pPlayer->nDestVertPan = pPlayer->horizon.horiz; pPlayer->bPlayerPan = pPlayer->bLockPan = true; @@ -2649,17 +2654,6 @@ loc_1BD2E: pPlayer->bPlayerPan = pPlayer->bLockPan = false; } - if (SyncInput()) - { - sethorizon(&pPlayer->horizon, sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions); - } - - if (sPlayerInput[nPlayer].pan) - { - pPlayer->nDestVertPan = pPlayer->horizon.horiz; - pPlayer->bPlayerPan = pPlayer->bLockPan = true; - } - if (totalvel[nPlayer] > 20) { pPlayer->bPlayerPan = false;