DEVELOP: let us spectate or pause the game at all times

TODO: This should be available as a debugging option at
release, since it would be useful for addon authors.
I don't want to make more cvars, those are getting
cluttered and should maybe be coalesced into a single
debugging option.
This commit is contained in:
James R 2023-08-14 05:05:21 -07:00
parent c7bd74c661
commit 01e2a26689
5 changed files with 24 additions and 0 deletions

View file

@ -3690,11 +3690,14 @@ static void Command_Pause(void)
CONS_Printf(M_GetText("You can't pause here.\n")); CONS_Printf(M_GetText("You can't pause here.\n"));
return; return;
} }
// TODO: this would make a great debug feature for release
#ifndef DEVELOP
else if (modeattacking) // in time attack, pausing restarts the map else if (modeattacking) // in time attack, pausing restarts the map
{ {
//M_ModeAttackRetry(0); // directly call from m_menu; //M_ModeAttackRetry(0); // directly call from m_menu;
return; return;
} }
#endif
SendNetXCmd(XD_PAUSE, &buf, 2); SendNetXCmd(XD_PAUSE, &buf, 2);
} }
@ -3715,8 +3718,11 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
return; return;
} }
// TODO: this would make a great debug feature for release
#ifndef DEVELOP
if (modeattacking && !demo.playback) if (modeattacking && !demo.playback)
return; return;
#endif
paused = READUINT8(*cp); paused = READUINT8(*cp);
dedicatedpause = READUINT8(*cp); dedicatedpause = READUINT8(*cp);

View file

@ -3318,6 +3318,10 @@ boolean G_GametypeHasTeams(void)
// //
boolean G_GametypeHasSpectators(void) boolean G_GametypeHasSpectators(void)
{ {
// TODO: this would make a great debug feature for release
#ifdef DEVELOP
return true;
#endif
return (netgame || (multiplayer && demo.netgame)); return (netgame || (multiplayer && demo.netgame));
} }

View file

@ -127,7 +127,10 @@ void K_CheckBumpers(void)
{ {
if (nobumpers > 0 && nobumpers >= numingame) if (nobumpers > 0 && nobumpers >= numingame)
{ {
// TODO: this would make a great debug feature for release
#ifndef DEVELOP
P_DoAllPlayersExit(PF_NOCONTEST, false); P_DoAllPlayersExit(PF_NOCONTEST, false);
#endif
return; return;
} }
} }

View file

@ -1998,7 +1998,15 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
if (!player->exiting && (specialstageinfo.valid == true || modeattacking & ATTACKING_SPB)) if (!player->exiting && (specialstageinfo.valid == true || modeattacking & ATTACKING_SPB))
{ {
// TODO: this would make a great debug feature for release
#ifdef DEVELOP
if (type != DMG_SPECTATOR)
{
P_DoPlayerExit(player, PF_NOCONTEST);
}
#else
P_DoPlayerExit(player, PF_NOCONTEST); P_DoPlayerExit(player, PF_NOCONTEST);
#endif
} }
if (player->exiting) if (player->exiting)

View file

@ -11841,7 +11841,10 @@ void P_SpawnPlayer(INT32 playernum)
} }
else // Otherwise, never spectator. else // Otherwise, never spectator.
{ {
// TODO: this would make a great debug feature for release
#ifndef DEVELOP
p->spectator = false; p->spectator = false;
#endif
} }
} }