-warp/+map is not a cheat for dedicated servers

It already is not a cheat for listen servers. Fixes dedicated servers not being able to save.
This commit is contained in:
Sally Coolatta 2024-05-22 01:32:21 -04:00 committed by spherallic
parent 90195e6105
commit a78b957ceb
2 changed files with 7 additions and 1 deletions

View file

@ -1535,7 +1535,7 @@ void D_SRB2Main(void)
I_Error("Cannot find a map remotely named '%s'\n", word);
else
{
if (!M_CheckParm("-server"))
if (!(M_CheckParm("-server") || dedicated))
G_SetUsedCheats(true);
autostart = true;
}

View file

@ -494,6 +494,12 @@ UINT8 M_MapLocked(INT32 mapnum, gamedata_t *data)
UINT8 M_CampaignWarpIsCheat(INT32 gt, INT32 mapnum, gamedata_t *data)
{
if (dedicated)
{
// See M_MapLocked; don't make dedicated servers annoying.
return false;
}
if (M_MapLocked(mapnum, data) == true)
{
// Warping to locked maps is definitely always a cheat