Merge pull request #741 from WantedDV/party

Fix: typo causing missing team change button
This commit is contained in:
Edo 2023-05-20 11:12:23 +01:00 committed by GitHub
commit 13b1310e61

View File

@ -1,23 +1,14 @@
local getModeInfo = function() local modeInfo = LobbyData:UITargetFromId(Engine.GetLobbyUIScreen())
local id = Engine.GetLobbyUIScreen() local maxClients = modeInfo.maxClients
return LobbyData:UITargetFromId(id)
end
local getMaxClients = function()
local modeInfo = getModeInfo()
return modeInfo.maxClients
end
-- Disable setting party privacy in menu. Auto set to open + max. -- Disable setting party privacy in menu. Auto set to open + max.
Engine.SetDvar("partyprivacyenabled", 0) Engine.SetDvar("partyprivacyenabled", 0)
Engine.SetDvar("tu4_partyprivacyuseglobal", 0) Engine.SetDvar("tu4_partyprivacyuseglobal", 0)
Engine.SetDvar("tu4_partyprivacyluacheck", 0) Engine.SetDvar("tu4_partyprivacyluacheck", 0)
local maxClients = getMaxClients()
-- Fix for invisible bots in custom games -- Fix for invisible bots in custom games
if maxClients >= 1 then if maxClients >= 1 then
return Engine.SetDvar("party_maxplayers", maxClients) Engine.SetDvar("party_maxplayers", maxClients)
end end
if not Engine.IsInGame() then if not Engine.IsInGame() then