2023-04-12 18:20:41 -04:00
|
|
|
if not Engine.IsInGame() then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2023-02-25 18:21:35 -05:00
|
|
|
-- Removed check for public matches to allow team change in ranked matches
|
|
|
|
CoD.IsTeamChangeAllowed = function()
|
2023-04-12 18:21:35 -04:00
|
|
|
if Engine.GetGametypeSetting("allowInGameTeamChange") == 1 then
|
2023-02-25 18:21:35 -05:00
|
|
|
return true
|
|
|
|
else
|
|
|
|
return false
|
|
|
|
end
|
2023-02-28 17:58:07 -05:00
|
|
|
end
|
|
|
|
|
2023-04-12 18:21:35 -04:00
|
|
|
local getModeInfo = function()
|
2023-04-12 16:59:00 -04:00
|
|
|
local id = Engine.GetLobbyUIScreen()
|
2023-04-12 18:21:35 -04:00
|
|
|
return LobbyData:UITargetFromId(id)
|
2023-04-12 16:59:00 -04:00
|
|
|
end
|
|
|
|
|
2023-04-12 18:21:35 -04:00
|
|
|
local getMaxClients = function()
|
|
|
|
local modeInfo = getModeInfo()
|
|
|
|
return modeInfo.maxClients
|
2023-04-11 15:56:50 -04:00
|
|
|
end
|
|
|
|
|
2023-04-12 16:59:00 -04:00
|
|
|
-- Set com_maxclients InGame so players can join via direct connect (default from lobbydata)
|
2023-04-12 18:21:35 -04:00
|
|
|
Engine.SetDvar("com_maxclients", getMaxClients())
|
2023-04-11 15:56:50 -04:00
|
|
|
|
2023-04-12 18:21:35 -04:00
|
|
|
require("datasources_start_menu_game_options")
|