- removed the remains of sending pause with the input packets.

None of this was really working anymore, but will have to be rethought once a network stream exists again.
But even then, this is better sent as a separate command, and in MP only.
This commit is contained in:
Christoph Oelckers 2020-08-27 22:38:52 +02:00
parent e0ca98602d
commit ee7d558282
8 changed files with 8 additions and 23 deletions

View file

@ -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();
{

View file

@ -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; });

View file

@ -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;

View file

@ -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)

View file

@ -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

View file

@ -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.

View file

@ -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; });

View file

@ -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; });