From bb4f46489feb243cee444fa0e1cc8e0debe52c68 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 27 Sep 2020 16:08:32 +1000 Subject: [PATCH] - Exhumed/SW: Adjust 9271444feb3f5e34513c003a9ec04774d64b358c and 289b0a089c8bd38eb795d0c5271fe7efca68c910 so that the games check the state of `cl_syncinput` prior to setting it. --- source/exhumed/src/osdcmds.cpp | 12 ++++++++++-- source/sw/src/player.cpp | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/source/exhumed/src/osdcmds.cpp b/source/exhumed/src/osdcmds.cpp index b163f52be..34ec72d51 100644 --- a/source/exhumed/src/osdcmds.cpp +++ b/source/exhumed/src/osdcmds.cpp @@ -34,6 +34,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_PS_NS +static bool gamesetinput = false; + static int osdcmd_warptocoords(CCmdFuncPtr parm) { if (parm->numparms < 3 || parm->numparms > 5) @@ -110,10 +112,16 @@ static int osdcmd_third_person_view(CCmdFuncPtr parm) { bCamera = !bCamera; - if (bCamera) + if (bCamera && !cl_syncinput) + { + gamesetinput = cl_syncinput = true; GrabPalette(); + } + } + if (gamesetinput && !bCamera) + { + gamesetinput = cl_syncinput = false; } - cl_syncinput = bCamera; return CCMD_OK; } diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 4355a6161..39d272e58 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -2836,7 +2836,10 @@ DoPlayerMoveVehicle(PLAYERp pp) } // force synchronised input here for now. - gamesetinput = cl_syncinput = true; + if (!cl_syncinput) + { + gamesetinput = cl_syncinput = true; + } if (PLAYER_MOVING(pp) == 0) RESET(pp->Flags, PF_PLAYER_MOVED);