diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index 1dc5cecff..2c34f5ad5 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -228,18 +228,3 @@ extern bool sendPause; extern int lastTic; -//--------------------------------------------------------------------------- -// -// Inline functions to help with edge cases where synchronised input is needed. -// -//--------------------------------------------------------------------------- - -extern bool gamesetinput; -inline void setForcedSyncInput() -{ - if (!cl_syncinput) gamesetinput = cl_syncinput = true; -} -inline void resetForcedSyncInput() -{ - if (gamesetinput) gamesetinput = cl_syncinput = false; -} diff --git a/source/core/inputstate.h b/source/core/inputstate.h index 8bb37c1c9..01996f41a 100644 --- a/source/core/inputstate.h +++ b/source/core/inputstate.h @@ -105,8 +105,24 @@ void SetupGameButtons(); void ApplyGlobalInput(InputPacket& input, ControlInfo* const hidInput, bool const crouchable = true, bool const disableToggle = false); extern ESyncBits ActionsToSend; double InputScale(); +extern bool gamesetinput; inline bool SyncInput() { - return cl_syncinput; -} \ No newline at end of file + return gamesetinput || cl_syncinput; +} + +//--------------------------------------------------------------------------- +// +// Inline functions to help with edge cases where synchronised input is needed. +// +//--------------------------------------------------------------------------- + +inline void setForcedSyncInput() +{ + gamesetinput = true; +} +inline void resetForcedSyncInput() +{ + gamesetinput = false; +} diff --git a/source/core/savegamehelp.cpp b/source/core/savegamehelp.cpp index d681906b1..32440c6dc 100644 --- a/source/core/savegamehelp.cpp +++ b/source/core/savegamehelp.cpp @@ -630,7 +630,7 @@ void SerializeMap(FSerializer& arc) .Array("headspritesect", headspritesect, MAXSECTORS + 1) .Array("nextspritesect", nextspritesect, MAXSPRITES) .Array("prevspritesect", prevspritesect, MAXSPRITES) - + ("tailspritefree", tailspritefree) ("myconnectindex", myconnectindex) ("connecthead", connecthead) @@ -643,7 +643,8 @@ void SerializeMap(FSerializer& arc) ("parallaxyo", parallaxyoffs_override) ("parallaxys", parallaxyscale_override) ("pskybits", pskybits_override) - ("numsprites", Numsprites); + ("numsprites", Numsprites) + ("gamesetinput", gamesetinput); SerializeInterpolations(arc);