From 6cbee1ac1c5cc5198a9a015fa58c0157e80bc653 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Tue, 19 Dec 2023 10:03:01 -0800 Subject: [PATCH] Fix start match button not working --- ui/t6/mainlobby.lua | 2 +- ui/t6/maps.lua | 8 ++++++++ ui_mp/t6/menus/privategamelobby_project.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/t6/mainlobby.lua b/ui/t6/mainlobby.lua index 6315e6cd..b8d6e65c 100644 --- a/ui/t6/mainlobby.lua +++ b/ui/t6/mainlobby.lua @@ -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 -- CoD.SwitchToPrivateLobby(ClientInstance.controller) if CoD.isZombie == true then - Engine.SetDvar("ui_zm_mapstartlocation", "") + -- Engine.SetDvar("ui_zm_mapstartlocation", "") Engine.SetDvar("ui_game_lobby_open", 0) MainLobbyWidget:openMenu("SelectGameModeListZM", ClientInstance.controller) -- CoD.GameGlobeZombie.MoveToCenter(ClientInstance.controller) diff --git a/ui/t6/maps.lua b/ui/t6/maps.lua index e153a819..945e3df2 100644 --- a/ui/t6/maps.lua +++ b/ui/t6/maps.lua @@ -165,6 +165,10 @@ local function mapListSelectionClickedEventHandler( self, event ) Engine.SetDvar("ui_zm_mapstartlocation", "tomb") end + if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 0 then + CoD.SwitchToPrivateLobby(self.controller) + end + self:openMenu("PrivateOnlineGameLobby", self.controller) self:close() @@ -275,6 +279,10 @@ local function locationListSelectionClickedEventHandler( self, event ) -- TODO: set dvars when location is added end + if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 0 then + CoD.SwitchToPrivateLobby(self.controller) + end + self:openMenu("PrivateOnlineGameLobby", self.controller) self:close() diff --git a/ui_mp/t6/menus/privategamelobby_project.lua b/ui_mp/t6/menus/privategamelobby_project.lua index d3ff207c..bb1681e4 100644 --- a/ui_mp/t6/menus/privategamelobby_project.lua +++ b/ui_mp/t6/menus/privategamelobby_project.lua @@ -572,7 +572,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project = function (PrivateGameLobbyWidget, Clie end 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) if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then local f27_local0 = PrivateGameLobbyWidget:openMenu("SelectMapListZM", ClientInstance.controller)