Robust com_maxclients override
- now sets com_maxclients to lobby default - supports all modes
This commit is contained in:
parent
56b5d346d4
commit
6a25f0e4ab
@ -7,15 +7,17 @@ CoD.IsTeamChangeAllowed = function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set com_maxclients InGame so players can join via direct connect
|
local GetModeInfo = function()
|
||||||
local maxclients = function()
|
local id = Engine.GetLobbyUIScreen()
|
||||||
if Engine.IsZombiesGame() then
|
return LobbyData:UITargetFromId(id)
|
||||||
return 4
|
|
||||||
else
|
|
||||||
return 18
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Engine.SetDvar( "com_maxclients", maxclients() )
|
local GetMaxClients = function()
|
||||||
|
local ModeInfo = GetModeInfo()
|
||||||
|
return ModeInfo.maxClients
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set com_maxclients InGame so players can join via direct connect (default from lobbydata)
|
||||||
|
Engine.SetDvar( "com_maxclients", GetMaxClients() )
|
||||||
|
|
||||||
require("DataSources_StartMenuGameOptions")
|
require("DataSources_StartMenuGameOptions")
|
||||||
|
Loading…
Reference in New Issue
Block a user