mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 10:32:27 +00:00
- Remove the extern status for gamesetinput
.
* We don't need to save this variable, we reset it at the start of every tic anyway.
This commit is contained in:
parent
183ad0c61c
commit
7da3b097fb
4 changed files with 19 additions and 23 deletions
|
@ -181,7 +181,7 @@ extern int hud_size_max;
|
|||
static bool sendPause;
|
||||
bool pausedWithKey;
|
||||
|
||||
bool gamesetinput = false;
|
||||
static bool gamesetinput = false;
|
||||
|
||||
int PlayClock;
|
||||
extern int nextwipe;
|
||||
|
@ -1519,6 +1519,21 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Raze, GetBuildTime, I_GetBuildTime)
|
|||
ACTION_RETURN_INT(I_GetBuildTime());
|
||||
}
|
||||
|
||||
bool SyncInput()
|
||||
{
|
||||
return gamesetinput || cl_syncinput || cl_capfps;
|
||||
}
|
||||
|
||||
void setForcedSyncInput()
|
||||
{
|
||||
gamesetinput = true;
|
||||
}
|
||||
|
||||
void resetForcedSyncInput()
|
||||
{
|
||||
gamesetinput = false;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Raze, forceSyncInput, setForcedSyncInput)
|
||||
{
|
||||
setForcedSyncInput();
|
||||
|
|
|
@ -47,6 +47,9 @@ void ChangeLevel(MapRecord* map, int skill, bool bossexit = false);
|
|||
void CompleteLevel(MapRecord* map);
|
||||
bool CheckCheatmode(bool printmsg = true, bool sponly = false);
|
||||
void setVideoMode();
|
||||
bool SyncInput();
|
||||
void setForcedSyncInput();
|
||||
void resetForcedSyncInput();
|
||||
|
||||
void TITLE_InformName(const char* newname);
|
||||
|
||||
|
|
|
@ -98,12 +98,6 @@ enum GameFunction_t
|
|||
void SetupGameButtons();
|
||||
void ApplyGlobalInput(HIDInput* const hidInput, InputPacket* const inputBuffer);
|
||||
extern ESyncBits ActionsToSend;
|
||||
extern bool gamesetinput;
|
||||
|
||||
inline bool SyncInput()
|
||||
{
|
||||
return gamesetinput || cl_syncinput || cl_capfps;
|
||||
}
|
||||
|
||||
inline float backendinputscale()
|
||||
{
|
||||
|
@ -115,18 +109,3 @@ inline void getHidInput(HIDInput* const hidInput)
|
|||
inputState.GetMouseDelta(hidInput);
|
||||
if (use_joystick) I_GetAxes(hidInput->joyaxes);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Inline functions to help with edge cases where synchronised input is needed.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
inline void setForcedSyncInput()
|
||||
{
|
||||
gamesetinput = true;
|
||||
}
|
||||
inline void resetForcedSyncInput()
|
||||
{
|
||||
gamesetinput = false;
|
||||
}
|
||||
|
|
|
@ -663,7 +663,6 @@ void SerializeMap(FSerializer& arc)
|
|||
("visibility", g_visibility)
|
||||
("relvisibility", g_relvisibility)
|
||||
("numsprites", Numsprites)
|
||||
("gamesetinput", gamesetinput)
|
||||
("allportals", allPortals);
|
||||
|
||||
SerializeInterpolations(arc);
|
||||
|
|
Loading…
Reference in a new issue