From 36f579f662f739a2f92386d9acefe81ddcf4ed2e Mon Sep 17 00:00:00 2001 From: Rim Date: Wed, 15 May 2024 00:51:05 -0400 Subject: [PATCH] maint: add changes from private repo --- data/maps/mp/gametypes/_playerlogic.gsc | 3 ++- data/ui_scripts/team_select/__init__.lua | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/data/maps/mp/gametypes/_playerlogic.gsc b/data/maps/mp/gametypes/_playerlogic.gsc index 78b4997..c311e05 100644 --- a/data/maps/mp/gametypes/_playerlogic.gsc +++ b/data/maps/mp/gametypes/_playerlogic.gsc @@ -476,7 +476,8 @@ spawnplayer( var_0 ) self.waitingtospawnamortize = 0; } - // // Returning false we use default character model and prevent a 5 second respawn delay. (Github issue #109) + // It's possible when changing teams that we don't have our own customization loaded, wait until that's done + // Setting self.waitingtospawnamortize to false so we can use the default character model and prevent a 5 second respawn delay. (Github issue #109) if ( !self hasloadedcustomizationplayerview( self ) ) self.waitingtospawnamortize = 0; diff --git a/data/ui_scripts/team_select/__init__.lua b/data/ui_scripts/team_select/__init__.lua index f482e6b..7724a6d 100644 --- a/data/ui_scripts/team_select/__init__.lua +++ b/data/ui_scripts/team_select/__init__.lua @@ -6,6 +6,8 @@ if (package.loaded["LUI.mp_hud.OptionsMenu"] == nil) then return end +game:addlocalizedstring("LUA_MENU_QUIT_TO_DESKTOP_CAPS", "QUIT TO DESKTOP") + package.loaded["LUI.mp_hud.OptionsMenu"].options_def = function() local f14_local0 = GameX.GetGameMode() local f14_local1 = Engine.TableLookup( GameTypesTable.File, GameTypesTable.Cols.Ref, f14_local0, GameTypesTable.Cols.ClassChoice ) == "1" @@ -90,12 +92,23 @@ package.loaded["LUI.mp_hud.OptionsMenu"].options_def = function() LUI.MenuBuilder.BuildAddChild(self, { type = "UIGenericButton", - id = "btn_MPPause_5", + id = "btn_MPPause_4", properties = { - childNum = 6, + childNum = 5, button_text = Engine.Localize( "@LUA_MENU_END_GAME_CAPS" ), button_action_func = LUI.mp_hud.OptionsMenu.endGameButtonAction } }) + + LUI.MenuBuilder.BuildAddChild(self, { + type = "UIGenericButton", + id = "btn_MPPause_5", + properties = { + childNum = 6, + button_text = Engine.Localize( "@LUA_MENU_QUIT_TO_DESKTOP_CAPS" ), + button_action_func = MBh.PopupMenu( "quit_popmenu", false, false ) + } + }) + return self end