1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-07 21:59:49 -05:00

Fix start match button not working

This commit is contained in:
Jbleezy 2023-12-19 10:03:01 -08:00
parent ab388b7186
commit 6cbee1ac1c
3 changed files with 10 additions and 2 deletions

View File

@ -191,7 +191,7 @@ CoD.MainLobby.OpenCustomGamesLobby = function (MainLobbyWidget, ClientInstance)
elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_privatematch")) == 1 then elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_privatematch")) == 1 then
-- CoD.SwitchToPrivateLobby(ClientInstance.controller) -- CoD.SwitchToPrivateLobby(ClientInstance.controller)
if CoD.isZombie == true then if CoD.isZombie == true then
Engine.SetDvar("ui_zm_mapstartlocation", "") -- Engine.SetDvar("ui_zm_mapstartlocation", "")
Engine.SetDvar("ui_game_lobby_open", 0) Engine.SetDvar("ui_game_lobby_open", 0)
MainLobbyWidget:openMenu("SelectGameModeListZM", ClientInstance.controller) MainLobbyWidget:openMenu("SelectGameModeListZM", ClientInstance.controller)
-- CoD.GameGlobeZombie.MoveToCenter(ClientInstance.controller) -- CoD.GameGlobeZombie.MoveToCenter(ClientInstance.controller)

View File

@ -165,6 +165,10 @@ local function mapListSelectionClickedEventHandler( self, event )
Engine.SetDvar("ui_zm_mapstartlocation", "tomb") Engine.SetDvar("ui_zm_mapstartlocation", "tomb")
end end
if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 0 then
CoD.SwitchToPrivateLobby(self.controller)
end
self:openMenu("PrivateOnlineGameLobby", self.controller) self:openMenu("PrivateOnlineGameLobby", self.controller)
self:close() self:close()
@ -275,6 +279,10 @@ local function locationListSelectionClickedEventHandler( self, event )
-- TODO: set dvars when location is added -- TODO: set dvars when location is added
end end
if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 0 then
CoD.SwitchToPrivateLobby(self.controller)
end
self:openMenu("PrivateOnlineGameLobby", self.controller) self:openMenu("PrivateOnlineGameLobby", self.controller)
self:close() self:close()

View File

@ -572,7 +572,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project = function (PrivateGameLobbyWidget, Clie
end end
CoD.PrivateGameLobby.OpenChangeStartLoc = function (PrivateGameLobbyWidget, ClientInstance) CoD.PrivateGameLobby.OpenChangeStartLoc = function (PrivateGameLobbyWidget, ClientInstance)
-- Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE)
Engine.SetDvar("ui_game_lobby_open", 1) Engine.SetDvar("ui_game_lobby_open", 1)
if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then
local f27_local0 = PrivateGameLobbyWidget:openMenu("SelectMapListZM", ClientInstance.controller) local f27_local0 = PrivateGameLobbyWidget:openMenu("SelectMapListZM", ClientInstance.controller)