small improvements to ui

This commit is contained in:
quaK 2024-08-04 00:39:49 +03:00
parent 21a87db733
commit 496537d7b6
3 changed files with 22 additions and 25 deletions

View File

@ -5,7 +5,6 @@ local f0_local0 = function ( f1_arg0, f1_arg1 )
end
local f0_local1 = function ( f2_arg0, f2_arg1 )
print ("Are we running?!?")
f0_local0( f2_arg0, f2_arg1 )
end
@ -183,4 +182,16 @@ function CPMainMenuButtons( menu, controller )
return VNavigator
end
CPMainMenu_original = MenuBuilder.m_types["CPMainMenu"]
function CPMainMenuStub( menu, controller )
ret = CPMainMenu_original( menu, controller )
-- play music immediately
Engine.PlayMusic( CoD.Music.MainCPMusic )
return ret
end
MenuBuilder.m_types["CPMainMenu"] = CPMainMenuStub
MenuBuilder.m_types["CPMainMenuButtons"] = CPMainMenuButtons

View File

@ -53,6 +53,8 @@ function SystemLinkMenuButtons( menu, controller )
if CONDITIONS.IsCoreMultiplayer( self ) then
f1_local5:addEventHandler( "button_action", function ( f2_arg0, f2_arg1 )
local f2_local0 = f2_arg1.controller or f1_local1
ClientWeapon.SetWeaponVisible( 0, true )
ClientCharacter.SetCharacterVisible( 0, true )
ACTIONS.OpenCreateAClass( self, f2_arg1 )
end )
end

View File

@ -7,10 +7,7 @@ serverBrowserOffsets = {
}
local f0_local4 = function ( f5_arg0, f5_arg1 )
Engine.ExecNow( "xstopprivateparty", f5_arg1.controller )
Engine.SetDvarBool( "systemlink", false )
Engine.SetDvarBool( "systemlink_host", false )
Engine.StopGameMode()
--Engine.StopGameMode()
LUI.FlowManager.RequestLeaveMenu( f5_arg0, true )
end
@ -58,9 +55,6 @@ local f0_local7 = function ( f11_arg0, f11_arg1, f11_arg2 )
else
Engine.ExecNow( MPConfig.default_systemlink, f11_arg1 )
end
if not Lobby.IsInPrivateParty() then
Engine.ExecNow( "xstartprivateparty", f11_arg1 )
end
Engine.Exec( MPConfig.default_dvars )
@ -99,26 +93,11 @@ local f0_local7 = function ( f11_arg0, f11_arg1, f11_arg2 )
end
end
end )
Engine.PLMRefreshData()
if Engine.IsCoreMode() then
FrontEndScene.CurrentMissionTeam = MissionDirector.InvalidTeamID
FrontEndScene.SetScene( "private_lobby_menu" )
ClientCharacter.SetCharacterVisible( FrontEndScene.ClientCharacters.Self, true )
if Fences.OfflineDataFetched( f11_arg1 ) then
local f11_local1 = CoD.GetPrivateLoadoutDataSource()
local f11_local2 = f11_local1.squadMembers.head:GetValue( f11_arg1 )
local f11_local3 = f11_local1.squadMembers.body:GetValue( f11_arg1 )
local f11_local4 = f11_local1.squadMembers.archetype:GetValue( f11_arg1 )
local f11_local5 = f11_local1.squadMembers.archetypeSuper:GetValue( f11_arg1 )
FrontEndScene.SetCharacterModelsByIndex( FrontEndScene.ClientCharacters.Self, f11_local3, f11_local2 )
FrontEndScene.SetWeaponForSuper( FrontEndScene.ClientCharacters.Self, f11_local5, f11_local4 )
FrontEndScene.PlayIdleForSuper( FrontEndScene.ClientCharacters.Self, f11_local5, f11_local4 )
ClientWeapon.SetWeaponIsViewModel( 0, true )
ClientWeapon.SetWeaponVisible( 0, false )
ClientCharacter.SetCharacterVisible( 0, true )
end
ClientWeapon.SetWeaponVisible( 0, false )
ClientCharacter.SetCharacterVisible( 0, false )
end
Lobby.SetPartyUIRoot( PartyUIRoot.SYSTEM_LINK )
local f11_local1 = LUI.FlowManager.GetScopedData( f11_arg0 )
@ -844,5 +823,10 @@ MenuBuilder.m_types["SystemLinkMenu"] = function ( menu, controller )
return self
end
local f0_local3 = function ()
clearMatchData()
WipeGlobalModelsAtPath( f0_local0 )
end
LUI.FlowManager.RegisterStackPushBehaviour( "SystemLinkMenu", PushFunc )
LUI.FlowManager.RegisterStackPopBehaviour( "SystemLinkMenu", f0_local3 )