diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-29 03:10:48 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-29 03:10:48 +0000 |
commit | 3b07ecab0467770ceec7b2d27cd66dadf481754c (patch) | |
tree | 3b187c39bd5d641ec80e88a3017c780360ad732e | |
parent | 185d1a4b281ef2b60d9c1c95b58238fb1e5bd63a (diff) | |
download | NorthstarLauncher-3b07ecab0467770ceec7b2d27cd66dadf481754c.tar.gz NorthstarLauncher-3b07ecab0467770ceec7b2d27cd66dadf481754c.zip |
lock max_players overrides behind commandline arg
-rw-r--r-- | NorthstarDedicatedTest/playlist.cpp | 5 |
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(); |