diff --git a/ui/t6/mainlobby.lua b/ui/t6/mainlobby.lua index 9e375f30..53f3a6f6 100644 --- a/ui/t6/mainlobby.lua +++ b/ui/t6/mainlobby.lua @@ -134,7 +134,7 @@ CoD.MainLobby.OpenPlayerMatchPartyLobby = function(MainLobbyWidget, ClientInstan if CoD.isZombie == true then Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_PLAYLIST) CoD.PlaylistCategoryFilter = "playermatch" - Engine.SetDvar("ui_game_lobby_open", 0) + CoD.PrivateGameLobby.InGameLobby = nil MainLobbyWidget:openMenu("SelectGameModeListZM", ClientInstance.controller) CoD.GameGlobeZombie.MoveToCenter(ClientInstance.controller) else @@ -192,7 +192,7 @@ CoD.MainLobby.OpenCustomGamesLobby = function(MainLobbyWidget, ClientInstance) -- CoD.SwitchToPrivateLobby(ClientInstance.controller) if CoD.isZombie == true then -- Engine.SetDvar("ui_zm_mapstartlocation", "") - Engine.SetDvar("ui_game_lobby_open", 0) + CoD.PrivateGameLobby.InGameLobby = nil MainLobbyWidget:openMenu("SelectGameModeListZM", ClientInstance.controller) -- CoD.GameGlobeZombie.MoveToCenter(ClientInstance.controller) else @@ -212,7 +212,7 @@ CoD.MainLobby.OpenSoloLobby_Zombie = function(MainLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_PLAYLIST) Dvar.party_maxplayers:set(1) CoD.PlaylistCategoryFilter = CoD.Zombie.PLAYLIST_CATEGORY_FILTER_SOLOMATCH - Engine.SetDvar("ui_game_lobby_open", 0) + CoD.PrivateGameLobby.InGameLobby = nil MainLobbyWidget:openMenu("SelectGameModeListZM", ClientInstance.controller) -- CoD.GameGlobeZombie.MoveToCenter(ClientInstance.controller) MainLobbyWidget:close() diff --git a/ui/t6/mapslist.lua b/ui/t6/mapslist.lua index 4cff1eaf..2ca07f45 100644 --- a/ui/t6/mapslist.lua +++ b/ui/t6/mapslist.lua @@ -115,7 +115,7 @@ function LUI.createMenu.SelectGameModeListZM(controller) local self = CoD.Menu.New("SelectGameModeListZM") self.controller = controller - if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 1 then + if CoD.PrivateGameLobby.InGameLobby == true then self:setPreviousMenu("PrivateOnlineGameLobby") else self:setPreviousMenu("MainLobby") @@ -176,7 +176,7 @@ local function mapListSelectionClickedEventHandler(self, event) Engine.SetDvar("ui_zm_mapstartlocation", "tomb") end - if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 0 then + if CoD.PrivateGameLobby.InGameLobby == nil then local gameType = UIExpression.DvarString(nil, "ui_gametype") local mapName = UIExpression.DvarString(nil, "ui_mapname") CoD.SwitchToPrivateLobby(self.controller) -- this changes "ui_gametype" and "ui_mapname" @@ -298,7 +298,7 @@ local function locationListSelectionClickedEventHandler(self, event) -- TODO: set dvars when location is added end - if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 0 then + if CoD.PrivateGameLobby.InGameLobby == nil then local gameType = UIExpression.DvarString(nil, "ui_gametype") local mapName = UIExpression.DvarString(nil, "ui_mapname") CoD.SwitchToPrivateLobby(self.controller) -- this changes "ui_gametype" and "ui_mapname" diff --git a/ui_mp/t6/menus/privategamelobby_project.lua b/ui_mp/t6/menus/privategamelobby_project.lua index de0d5f10..08edfa77 100644 --- a/ui_mp/t6/menus/privategamelobby_project.lua +++ b/ui_mp/t6/menus/privategamelobby_project.lua @@ -456,7 +456,7 @@ end CoD.PrivateGameLobby.OpenChangeStartLoc = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE) - Engine.SetDvar("ui_game_lobby_open", 1) + CoD.PrivateGameLobby.InGameLobby = true if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then local f27_local0 = PrivateGameLobbyWidget:openMenu("SelectMapListZM", ClientInstance.controller) f27_local0:setPreviousMenu("SelectGameModeListZM")