diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 44c2fe282..249545a3d 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -560,15 +560,6 @@ void ProcessFrame(void) levelRestart(); return; } - if (gPlayer[i].input.syncFlags.pause) - { - gPlayer[i].input.syncFlags.pause = 0; - if (paused && gGameOptions.nGameType > 0 && numplayers > 1) - { - sprintf(buffer,"%s paused the game",gProfile[i].name); - viewSetMessage(buffer); - } - } } viewClearInterpolations(); { diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index 0240efb89..51e71e09d 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -125,11 +125,6 @@ void ctrlGetInput(void) return; } - if (paused != prevPauseState) - { - gInput.syncFlags.pause = 1; - } - if (paused) return; @@ -346,7 +341,6 @@ void ctrlGetInput(void) void registerinputcommands() { - C_RegisterFunction("pause", nullptr, [](CCmdFuncPtr)->int { BitsToSend.pause = 1; sendPause = true; return CCMD_OK; }); C_RegisterFunction("centerview", nullptr, [](CCmdFuncPtr)->int { BitsToSend.lookCenter = 1; return CCMD_OK; }); C_RegisterFunction("holsterweapon", nullptr, [](CCmdFuncPtr)->int { BitsToSend.holsterWeapon = 1; return CCMD_OK; }); C_RegisterFunction("turnaround", nullptr, [](CCmdFuncPtr)->int { BitsToSend.spin180 = 1; return CCMD_OK; }); diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 07fafdd0e..12ab64eeb 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -100,7 +100,6 @@ auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need int gameclock; int lastTic; -bool sendPause; int automapMode; bool automapFollow; @@ -908,6 +907,7 @@ void TickSubsystems() static void updatePauseStatus() { + // This must go through the network in multiplayer games. if (M_Active() || System_WantGuiCapture()) { paused = 1; diff --git a/source/core/inputstate.cpp b/source/core/inputstate.cpp index b92f9658e..db2f46148 100644 --- a/source/core/inputstate.cpp +++ b/source/core/inputstate.cpp @@ -44,6 +44,7 @@ static int WeaponToSend = 0; ESyncBits ActionsToSend = 0; static int dpad_lock = 0; +bool sendPause; //========================================================================== // @@ -294,6 +295,11 @@ CCMD(invuse) ActionsToSend |= SB_INVUSE; } +CCMD(pause) +{ + sendPause = true; +} + void ApplyGlobalInput(InputPacket& input, ControlInfo *info) diff --git a/source/core/packet.h b/source/core/packet.h index 6018ae106..e856e962a 100644 --- a/source/core/packet.h +++ b/source/core/packet.h @@ -70,7 +70,6 @@ enum EDukeSyncBits_ : uint32_t SKB_MULTIFLAG = 1 << 17, SKB_CENTER_VIEW = 1 << 18, SKB_HOLSTER = 1 << 19, - SKB_PAUSE = 1 << 21, SKB_QUICK_KICK = 1 << 22, SKB_AIMMODE = 1 << 23, SKB_GAMEQUIT = 1 << 26, @@ -79,7 +78,7 @@ enum EDukeSyncBits_ : uint32_t SKB_ESCAPE = 1u << 31, SKB_INTERFACE_BITS = (SKB_QUICK_KICK | \ - SKB_HOLSTER | SKB_PAUSE | \ + SKB_HOLSTER | \ SKB_TURNAROUND | SKB_OPEN | SKB_ESCAPE), SKB_NONE = 0, @@ -110,7 +109,6 @@ union SYNCFLAGS unsigned int lookLeft : 1; unsigned int lookRight : 1; unsigned int spin180 : 1; - unsigned int pause : 1; unsigned int quit : 1; unsigned int restart : 1; }; @@ -125,7 +123,6 @@ union SYNCFLAGS #define SK_AUTO_AIM 7 #define SK_CENTER_VIEW 8 -#define SK_PAUSE 9 #define SK_MESSAGE 11 #define SK_LOOK_UP 12 diff --git a/source/exhumed/src/input.cpp b/source/exhumed/src/input.cpp index 332b86585..4b748f42f 100644 --- a/source/exhumed/src/input.cpp +++ b/source/exhumed/src/input.cpp @@ -384,7 +384,6 @@ int ccmd_centerview(CCmdFuncPtr parm); void registerinputcommands() { - C_RegisterFunction("pause", nullptr, [](CCmdFuncPtr)->int { /*BitsToSend |= SKB_PAUSE;*/ sendPause = true; return CCMD_OK; }); C_RegisterFunction("centerview", nullptr, ccmd_centerview); // These are only here to silence the engine when the keys bound to them are pressed. The functions do not exist. diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 9e46ea6cf..7e27e95ac 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -1154,7 +1154,6 @@ void GetInput() void registerinputcommands() { - C_RegisterFunction("pause", nullptr, [](CCmdFuncPtr)->int { BitsToSend |= SKB_PAUSE; sendPause = true; return CCMD_OK; }); C_RegisterFunction("centerview", nullptr, [](CCmdFuncPtr)->int { BitsToSend |= SKB_CENTER_VIEW; return CCMD_OK; }); C_RegisterFunction("holsterweapon", nullptr, [](CCmdFuncPtr)->int { BitsToSend |= SKB_HOLSTER; return CCMD_OK; }); diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index f3ec56ed2..49bbdaa18 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -469,7 +469,6 @@ getinput(InputPacket *loc, SWBOOL tied) void registerinputcommands() { - C_RegisterFunction("pause", nullptr, [](CCmdFuncPtr)->int { BitsToSend |= BIT(SK_PAUSE); sendPause = true; return CCMD_OK; }); C_RegisterFunction("centerview", nullptr, [](CCmdFuncPtr)->int { BitsToSend |= BIT(SK_CENTER_VIEW); return CCMD_OK; }); C_RegisterFunction("holsterweapon", nullptr, [](CCmdFuncPtr)->int { BitsToSend |= BIT(SK_HIDE_WEAPON); return CCMD_OK; });