set com_maxclients ingame to allow direct connect

- 4 for zombies
- 18 for multiplayer
This commit is contained in:
WantedDV 2023-04-11 17:26:50 -02:30
parent 149de6e77e
commit 5581f0100f

View File

@ -1,4 +1,3 @@
-- Removed check for public matches to allow team change in ranked matches
CoD.IsTeamChangeAllowed = function()
if Engine.GetGametypeSetting( "allowInGameTeamChange" ) == 1 then
@ -8,6 +7,18 @@ CoD.IsTeamChangeAllowed = function()
end
end
-- Set com_maxclients InGame so players can join via direct connect
local maxclients = function()
if Engine.IsZombiesGame() then
return 4
else
return 18
end
end
Engine.SetDvar( "com_maxclients", maxclients() )
DataSources.StartMenuGameOptions = ListHelper_SetupDataSource("StartMenuGameOptions", function (controller)
local options = {}
if Engine.IsDemoPlaying() then