aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/playlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/playlist.cpp')
-rw-r--r--NorthstarDedicatedTest/playlist.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/playlist.cpp b/NorthstarDedicatedTest/playlist.cpp
index 47fb109c..01a2de6a 100644
--- a/NorthstarDedicatedTest/playlist.cpp
+++ b/NorthstarDedicatedTest/playlist.cpp
@@ -56,7 +56,7 @@ void SetPlaylistVarOverrideHook(const char* varName, const char* value)
char* GetCurrentPlaylistVarHook(const char* varName, bool useOverrides)
{
- if (!useOverrides && !strcmp(varName, "max_players"))
+ if (!useOverrides && CommandLine()->CheckParm("-maxplayersplaylist") && !strcmp(varName, "max_players"))
useOverrides = true;
return GetCurrentPlaylistVarOriginal(varName, useOverrides);
@@ -64,6 +64,9 @@ char* GetCurrentPlaylistVarHook(const char* varName, bool useOverrides)
int GetCurrentGamemodeMaxPlayersHook()
{
+ if (!CommandLine()->CheckParm("-maxplayersplaylist"))
+ return GetCurrentGamemodeMaxPlayers();
+
char* maxPlayersStr = GetCurrentPlaylistVar("max_players", 0);
if (!maxPlayersStr)
return GetCurrentGamemodeMaxPlayers();