From 672c53c35c6e5b18d8ea925d9bb3265d61b193c6 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 18 Mar 2023 19:54:05 +1100 Subject: [PATCH] - Move CCMD `pause` to gamecontrol.cpp so it can be static. --- source/core/gamecontrol.cpp | 7 +++++++ source/core/gamecontrol.h | 1 - source/core/inputstate.cpp | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 2a7887895..fd24e9227 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -178,6 +178,7 @@ CVAR(Bool, disableautoload, false, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALC extern int hud_size_max; +static bool sendPause; bool pausedWithKey; bool gamesetinput = false; @@ -1289,6 +1290,12 @@ void CONFIG_ReadCombatMacros() //========================================================================== +CCMD(pause) +{ + sendPause = true; +} + + CCMD(snd_reset) { Mus_Stop(); diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index a950583b9..0647ec113 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -235,7 +235,6 @@ enum extern int paused; extern int chatmodeon; -extern bool sendPause; extern int lastTic; extern int PlayClock; diff --git a/source/core/inputstate.cpp b/source/core/inputstate.cpp index e514c9260..1bb8cb5d7 100644 --- a/source/core/inputstate.cpp +++ b/source/core/inputstate.cpp @@ -48,7 +48,6 @@ static int WeaponToSend = 0; ESyncBits ActionsToSend = 0; static int dpad_lock = 0; -bool sendPause; bool crouch_toggle; // Mouse speeds @@ -323,11 +322,6 @@ CCMD(holsterweapon) ActionsToSend |= SB_HOLSTER; } -CCMD(pause) -{ - sendPause = true; -} - CCMD(warptocoords) { if (netgame)