1435 lines
40 KiB
Lua
1435 lines
40 KiB
Lua
local f0_local0 = module
|
|
local f0_local1, f0_local2 = ...
|
|
f0_local0( f0_local1, package.seeall )
|
|
CoD.PrintModuleLoad( _NAME )
|
|
f0_local0 = Engine.GetDvarFloat( "safeArea_adjusted_horizontal" )
|
|
f0_local1 = Engine.GetDvarFloat( "safeArea_adjusted_vertical" )
|
|
f0_local2 = ""
|
|
local f0_local3 = function ( f1_arg0 )
|
|
local f1_local0 = "mlg"
|
|
if MLG.IsFollowing then
|
|
local f1_local1 = MLG.IsFollowing()
|
|
local f1_local2 = "_following"
|
|
end
|
|
return f1_local0 .. (f1_local1 and f1_local2 or "") .. (f1_arg0.noMap and "_nomap" or "")
|
|
end
|
|
|
|
local f0_local4 = false
|
|
local f0_local5 = function ( f2_arg0, f2_arg1 )
|
|
local f2_local0 = MLG.IsMLGSpectator()
|
|
local f2_local1 = Game.InKillCam()
|
|
local f2_local2 = Game.IsEmpJammed()
|
|
local f2_local3 = CoD.UsingKillstreakRemote()
|
|
local f2_local4 = GameX.IsHardcoreMode()
|
|
local f2_local5 = Engine.GetDvarString( "ui_game_state" ) == "postgame"
|
|
local f2_local6 = Game.GetOmnvar( "ui_session_state" )
|
|
local f2_local7 = f2_local6 ~= "playing"
|
|
local f2_local8 = not Engine.GetDvarBool( "cg_draw2D" )
|
|
local f2_local9 = Engine.GetDvarString( "createfx" ) == "on"
|
|
local f2_local10 = Engine.GetDvarString( "ui_gametype" )
|
|
local f2_local11 = GameX.IsSplitscreen()
|
|
local f2_local12 = Game.IsSpectating() or f2_local6 == "spectator"
|
|
local f2_local13 = Game.GetOmnvar( "ui_match_start_countdown" ) > 0
|
|
local f2_local14 = f2_arg0.is_paused
|
|
local f2_local15 = f2_arg0.is_migrating
|
|
local f2_local16 = Game.GetOmnvar( "ui_satcom_active" )
|
|
local f2_local17 = f2_arg0:getChildById( "cornersHudId" )
|
|
local f2_local18 = f2_arg0:getChildById( "spectatorHudId" )
|
|
local f2_local19 = f2_arg0:getChildById( "fireTeamHudId" )
|
|
local f2_local20 = f2_arg0:getChildById( "gameMessageHudId" )
|
|
local f2_local21 = f2_arg0:getChildById( "hintsHudId" )
|
|
local f2_local22 = f2_arg0:getChildById( "lowHealthHudId" )
|
|
local f2_local23 = f2_arg0:getChildById( "pointsPopupHudId" )
|
|
local f2_local24 = f2_arg0:getChildById( "matchStartHudId" )
|
|
local f2_local25 = f2_arg0:getChildById( "matchStartObjectiveHudId" )
|
|
local f2_local26 = f2_arg0:getChildById( "vitaHudId" )
|
|
local f2_local27 = f2_arg0:getChildById( "shakeContainerHudId" )
|
|
local f2_local28 = f2_arg0:getChildById( "damageFeedbackHudId" )
|
|
local f2_local29 = f2_arg0:getChildById( "hudIconTypeHudId" )
|
|
local f2_local30 = f2_arg0:getChildById( "killCamHudId" )
|
|
local f2_local31 = f2_local27:getChildById( "weaponInfoHudId" )
|
|
local f2_local32 = f2_local27:getChildById( "playerInfoHudId" )
|
|
local f2_local33 = f2_local27:getChildById( "minimapHudId" )
|
|
local f2_local34 = f2_local27:getChildById( "lowAmmoWarningHudId" )
|
|
local f2_local35 = f2_local27:getChildById( "captureDomHudId" )
|
|
local f2_local36 = f2_local27:getChildById( "captureHudId" )
|
|
local f2_local37 = f2_local27:getChildById( "hordeHudId" )
|
|
local f2_local38 = f2_local27:getChildById( "hordeRoundHudId" )
|
|
local f2_local39 = f2_local27:getChildById( "hordePerksHudId" )
|
|
local f2_local40 = f2_local27:getChildById( "hordeExpAmmoHudId" )
|
|
local f2_local41 = f2_local27:getChildById( "bombPlantDefuseHudId" )
|
|
local f2_local42 = f2_local27:getChildById( "scorelistHudId" )
|
|
local f2_local43 = f2_local27:getChildById( "teamScoresHudId" )
|
|
local f2_local44 = f2_local27:getChildById( "intelInfoHudId" )
|
|
local f2_local45 = f2_local27:getChildById( "splashesHudId" )
|
|
local f2_local46 = f2_local27:getChildById( "perksOnSpawnHudId" )
|
|
local f2_local47 = f2_local27:getChildById( "killstreakVisHandlerId" )
|
|
local f2_local48 = f2_local27:getChildById( "digKillstreakHudId" )
|
|
local f2_local49 = Game.GetPlayerWeaponName()
|
|
local f2_local50 = {
|
|
f2_local31,
|
|
f2_local32,
|
|
f2_local33,
|
|
f2_local34,
|
|
f2_local35,
|
|
f2_local36,
|
|
f2_local37,
|
|
f2_local38,
|
|
f2_local39,
|
|
f2_local40,
|
|
f2_local41,
|
|
f2_local43,
|
|
f2_local42,
|
|
f2_local44,
|
|
f2_local17,
|
|
f2_local28,
|
|
f2_local29,
|
|
f2_local45,
|
|
f2_local18,
|
|
f2_local19,
|
|
f2_local20,
|
|
f2_local21,
|
|
f2_local26,
|
|
f2_local24,
|
|
f2_local25,
|
|
f2_local22,
|
|
f2_local23,
|
|
f2_local46,
|
|
f2_local30,
|
|
f2_local47,
|
|
f2_local48
|
|
}
|
|
local f2_local51 = {
|
|
weaponInfoHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
playerInfoHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_horde_spectating",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
minimapHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_player",
|
|
"spectating_fireteam",
|
|
"spectating_odin",
|
|
"mlg",
|
|
"mlg_following",
|
|
"hardcore_mode_satcom",
|
|
"in_odin",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
lowAmmoWarningHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
captureDomHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom"
|
|
} ),
|
|
captureHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
hordeHudId = hashset( {
|
|
"default_horde_mode",
|
|
"default_horde_match_countdown"
|
|
} ),
|
|
hordeRoundHudId = hashset( {
|
|
"default_horde_mode",
|
|
"default_horde_match_countdown",
|
|
"default_horde_spectating"
|
|
} ),
|
|
hordePerksHudId = hashset( {
|
|
"default_horde_mode"
|
|
} ),
|
|
hordeExpAmmoHudId = hashset( {
|
|
"default_horde_mode"
|
|
} ),
|
|
bombPlantDefuseHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom"
|
|
} ),
|
|
teamScoresHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_fireteam",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
scorelistHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"killcam",
|
|
"spectating",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_fireteam",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg",
|
|
"mlg_following",
|
|
"mlg_nomap",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"session_invalid",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"default_horde_spectating",
|
|
"postgame",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
intelInfoHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_horde_match_countdown"
|
|
} ),
|
|
cornersHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
damageFeedbackHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"killcam",
|
|
"spectating_fireteam",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"default_horde_match_countdown",
|
|
"postgame",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
hudIconTypeHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"killcam",
|
|
"spectating_fireteam",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"default_horde_match_countdown",
|
|
"postgame",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
splashesHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
spectatorHudId = hashset( {
|
|
"spectating",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"default_horde_spectating"
|
|
} ),
|
|
fireTeamHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"killcam",
|
|
"spectating",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"session_invalid"
|
|
} ),
|
|
gameMessageHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
hintsHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
vitaHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_fireteam",
|
|
"default_horde_match_countdown",
|
|
"default_horde_spectating",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
matchStartHudId = hashset( {
|
|
"default_match_countdown",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg",
|
|
"mlg_following",
|
|
"mlg_nomap",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"paused_match_countdown",
|
|
"default_horde_match_countdown",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
matchStartObjectiveHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"spectating",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"paused_match_countdown",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
lowHealthHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"killcam",
|
|
"spectating",
|
|
"spectating_player",
|
|
"spectating_player_hardcore",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"default_horde_match_countdown",
|
|
"default_horde_spectating",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
pointsPopupHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"killcam",
|
|
"spectating_fireteam",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
perksOnSpawnHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"mlg_following",
|
|
"mlg_following_nomap"
|
|
} ),
|
|
killCamHudId = hashset( {
|
|
"killcam"
|
|
} ),
|
|
killstreakVisHandlerId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"spectating_fireteam",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"default_horde_match_countdown",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} ),
|
|
digKillstreakHudId = hashset( {
|
|
"default",
|
|
"default_match_countdown",
|
|
"default_horde_mode",
|
|
"default_sotf_mode",
|
|
"default_sotf_match_countdown",
|
|
"emp_jammed",
|
|
"killcam",
|
|
"spectating_fireteam",
|
|
"spectating_killstreak",
|
|
"spectating_odin",
|
|
"mlg_following",
|
|
"mlg_following_nomap",
|
|
"hardcore_mode",
|
|
"hardcore_mode_satcom",
|
|
"killstreak_remote",
|
|
"in_odin",
|
|
"default_horde_match_countdown",
|
|
"postgame",
|
|
"default_infect_mode",
|
|
"default_infect_match_countdown"
|
|
} )
|
|
}
|
|
local f2_local52 = nil
|
|
if f2_local15 then
|
|
f2_local52 = "migrating"
|
|
elseif f2_local5 then
|
|
if f2_local1 then
|
|
f2_local52 = "killcam"
|
|
else
|
|
f2_local52 = "postgame"
|
|
end
|
|
elseif f2_local8 then
|
|
f2_local52 = "dont_draw_hud"
|
|
elseif f2_local9 then
|
|
f2_local52 = "create_fx_enabled"
|
|
elseif f2_local14 then
|
|
if f2_local13 then
|
|
f2_local52 = "paused_match_countdown"
|
|
else
|
|
f2_local52 = "paused"
|
|
end
|
|
elseif f2_local1 and not f2_local0 then
|
|
f2_local52 = "killcam"
|
|
elseif f2_local12 then
|
|
if f2_local0 then
|
|
f2_local52 = f0_local3( f2_arg0 )
|
|
elseif CoD.IsFireTeamMode() then
|
|
f2_local52 = "spectating_fireteam"
|
|
elseif not GameX.IsSpectatingNotOnTeam() then
|
|
if f2_local10 == "horde" then
|
|
f2_local52 = "default_horde_spectating"
|
|
elseif f2_local4 then
|
|
f2_local52 = "spectating_player_hardcore"
|
|
elseif f2_local3 then
|
|
if CoD.UsingOdinOrLoki() then
|
|
f2_local52 = "spectating_odin"
|
|
else
|
|
f2_local52 = "spectating_killstreak"
|
|
end
|
|
else
|
|
f2_local52 = "spectating_player"
|
|
end
|
|
else
|
|
f2_local52 = "spectating"
|
|
end
|
|
elseif f2_local4 then
|
|
if f2_local16 then
|
|
f2_local52 = "hardcore_mode_satcom"
|
|
else
|
|
f2_local52 = "hardcore_mode"
|
|
end
|
|
elseif f2_local7 then
|
|
f2_local52 = "session_invalid"
|
|
elseif f2_local3 then
|
|
if CoD.UsingOdinOrLoki() then
|
|
f2_local52 = "in_odin"
|
|
else
|
|
f2_local52 = "killstreak_remote"
|
|
end
|
|
elseif f2_local2 and not f2_local14 then
|
|
f2_local52 = "emp_jammed"
|
|
elseif f2_local10 == "horde" then
|
|
if f2_local13 then
|
|
f2_local52 = "default_horde_match_countdown"
|
|
else
|
|
f2_local52 = "default_horde_mode"
|
|
end
|
|
elseif f2_local10 == "sotf" or f2_local10 == "sotf_ffa" then
|
|
if f2_local13 then
|
|
f2_local52 = "default_sotf_match_countdown"
|
|
else
|
|
f2_local52 = "default_sotf_mode"
|
|
end
|
|
elseif f2_local10 == "infect" then
|
|
if f2_local13 then
|
|
f2_local52 = "default_infect_match_countdown"
|
|
else
|
|
f2_local52 = "default_infect_mode"
|
|
end
|
|
elseif f2_local13 then
|
|
f2_local52 = "default_match_countdown"
|
|
else
|
|
f2_local52 = "default"
|
|
end
|
|
for f2_local56, f2_local57 in pairs( f2_local50 ) do
|
|
if f2_local51[f2_local57.id][f2_local52] then
|
|
if f2_arg0.current_state ~= "hud_on" then
|
|
f2_arg0:animateToState( "hud_on", 0 )
|
|
f2_arg0.current_state = "hud_on"
|
|
end
|
|
if f2_local57.current_state ~= "hud_on" then
|
|
f2_local57:animateToState( "hud_on", 100 )
|
|
f2_local57.current_state = "hud_on"
|
|
f2_local57:processEvent( {
|
|
name = "hud_on"
|
|
} )
|
|
end
|
|
end
|
|
if f2_local57.current_state ~= "hud_off" then
|
|
f2_local57:animateToState( "hud_off", 0 )
|
|
f2_local57.current_state = "hud_off"
|
|
f2_local57:processEvent( {
|
|
name = "hud_off"
|
|
} )
|
|
end
|
|
end
|
|
if f2_local9 and not f2_arg0.is_createFXEnabled then
|
|
Engine.Exec( "ufo" )
|
|
f2_arg0.is_createFXEnabled = true
|
|
end
|
|
if not f2_arg0.is_paused and (f0_local0 ~= Engine.GetDvarFloat( "safeArea_adjusted_horizontal" ) or f0_local1 ~= Engine.GetDvarFloat( "safeArea_adjusted_vertical" )) then
|
|
f0_local0 = Engine.GetDvarFloat( "safeArea_adjusted_horizontal" )
|
|
f0_local1 = Engine.GetDvarFloat( "safeArea_adjusted_vertical" )
|
|
f2_local53 = {}
|
|
f2_local53 = GameX.GetSafeZoneSize( f0_local0, f0_local1 )
|
|
f2_arg0:registerAnimationState( "new_margins", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
left = f2_local53[1],
|
|
top = f2_local53[2],
|
|
right = f2_local53[3],
|
|
bottom = f2_local53[4],
|
|
alpha = 1
|
|
} )
|
|
f2_arg0:animateToState( "new_margins", 0 )
|
|
f2_arg0:registerAnimationState( "default_on", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
left = f2_local53[1],
|
|
top = f2_local53[2],
|
|
right = f2_local53[3],
|
|
bottom = f2_local53[4],
|
|
alpha = 1
|
|
} )
|
|
end
|
|
if Engine.IsVita() and f2_local26 then
|
|
f2_local53 = Engine.GetProfileData( "gpadButtonsConfig" )
|
|
if f0_local2 ~= f2_local53 then
|
|
f0_local2 = f2_local53
|
|
f2_local26:processEvent( {
|
|
name = "vita_hud_button_update"
|
|
} )
|
|
end
|
|
end
|
|
if not f0_local4 and f2_local5 then
|
|
f2_arg0:dispatchEventToRoot( {
|
|
name = "post_game_begin"
|
|
} )
|
|
elseif f0_local4 and not f2_local5 then
|
|
f2_arg0:dispatchEventToRoot( {
|
|
name = "post_game_end"
|
|
} )
|
|
end
|
|
f0_local4 = f2_local5
|
|
end
|
|
|
|
local f0_local6 = function ( f3_arg0, f3_arg1 )
|
|
LUI.FlowManager.RequestAddMenu( f3_arg0, "mp_pause_menu", true, f3_arg1.controller, false )
|
|
end
|
|
|
|
local f0_local7 = function ( f4_arg0, f4_arg1 )
|
|
if Engine.GetDvarString( "ui_game_state" ) == "postgame" == false then
|
|
f4_arg0.is_paused = false
|
|
f4_arg0:processEvent( {
|
|
name = "hud_refresh"
|
|
} )
|
|
end
|
|
end
|
|
|
|
local f0_local8 = function ( f5_arg0, f5_arg1 )
|
|
if Engine.GetDvarString( "ui_game_state" ) == "postgame" == false and f5_arg0.is_migrating == true == false then
|
|
f5_arg0.is_paused = true
|
|
f5_arg0:processEvent( {
|
|
name = "hud_refresh"
|
|
} )
|
|
f0_local6( f5_arg0, f5_arg1 )
|
|
end
|
|
end
|
|
|
|
local f0_local9 = function ( f6_arg0, f6_arg1 )
|
|
f6_arg0.is_migrating = true
|
|
end
|
|
|
|
local f0_local10 = function ( f7_arg0, f7_arg1 )
|
|
local f7_local0 = Engine.GetDvarString( "ui_game_state" ) == "postgame"
|
|
f7_arg0.is_migrating = false
|
|
if f7_local0 == false then
|
|
f7_arg0.is_paused = false
|
|
f7_arg0:processEvent( {
|
|
name = "hud_refresh"
|
|
} )
|
|
end
|
|
end
|
|
|
|
local f0_local11 = function ( f8_arg0, f8_arg1 )
|
|
if f8_arg1.value == true and Game.GetOmnvar( "ui_hud_static" ) == 0 then
|
|
f8_arg0:processEvent( {
|
|
name = "hud_shake"
|
|
} )
|
|
f8_arg0.minimapHud:processEvent( {
|
|
name = "hud_shake"
|
|
} )
|
|
end
|
|
end
|
|
|
|
local f0_local12 = function ( f9_arg0, f9_arg1 )
|
|
if f9_arg1.value then
|
|
f9_arg0.empArtifact:processEvent( {
|
|
name = "hud_static_on"
|
|
} )
|
|
else
|
|
f9_arg0.empArtifact:processEvent( {
|
|
name = "hud_static_off"
|
|
} )
|
|
end
|
|
end
|
|
|
|
local f0_local13 = {
|
|
"one",
|
|
"two",
|
|
"three",
|
|
"four"
|
|
}
|
|
local f0_local14 = {
|
|
53,
|
|
61,
|
|
73,
|
|
83,
|
|
97,
|
|
113,
|
|
127
|
|
}
|
|
local f0_local15 = function ( f10_arg0 )
|
|
return f10_arg0[math.random( 1, #f10_arg0 )]
|
|
end
|
|
|
|
function GetStaticSequence( f11_arg0 )
|
|
local f11_local0 = {}
|
|
table.insert( f11_local0, {
|
|
f0_local15( f0_local13 ),
|
|
0
|
|
} )
|
|
for f11_local1 = 1, f11_arg0, 1 do
|
|
local f11_local4 = f11_local1
|
|
local f11_local5 = table.insert
|
|
local f11_local6 = f11_local0
|
|
local f11_local7 = {}
|
|
local f11_local8 = f0_local15( f0_local13 )
|
|
local f11_local9 = f0_local15( f0_local14 )
|
|
f11_local5( f11_local6, f11_local8 )
|
|
end
|
|
return f11_local0
|
|
end
|
|
|
|
local f0_local16 = function ( f12_arg0, f12_arg1 )
|
|
local f12_local0 = f12_arg1 - f12_arg0
|
|
local f12_local1 = math.random( -f12_local0, f12_local0 )
|
|
if f12_local1 >= 0 then
|
|
f12_local1 = f12_local1 + f12_arg0
|
|
else
|
|
f12_local1 = f12_local1 - f12_arg0
|
|
end
|
|
return f12_local1
|
|
end
|
|
|
|
local f0_local17 = 3
|
|
local f0_local18 = 6
|
|
local f0_local19 = function ( f13_arg0, f13_arg1 )
|
|
local f13_local0 = math.random( f0_local17, f0_local18 )
|
|
local f13_local1 = GetStaticSequence( f13_local0 )
|
|
local f13_local2 = MBh.AnimateSequence( f13_local1 )
|
|
f13_local2( f13_arg0.empStatic:getFirstDescendentById( "jammerStaticId" ) )
|
|
local f13_local3 = f13_arg0:getChildById( "shakeContainerHudId" )
|
|
local f13_local4 = {}
|
|
for f13_local5 = 1, f13_local0, 1 do
|
|
local f13_local8 = f13_local5 % 2 == 0
|
|
local f13_local9 = 0
|
|
local f13_local10 = nil
|
|
local f13_local11 = 0
|
|
local f13_local12 = nil
|
|
if f13_local8 then
|
|
f13_local9 = 20
|
|
f13_local10 = 40
|
|
f13_local11 = 4
|
|
f13_local12 = 6
|
|
else
|
|
f13_local9 = 60
|
|
f13_local10 = 80
|
|
f13_local11 = 1
|
|
f13_local12 = 2
|
|
end
|
|
local f13_local13 = "shake_loop_" .. f13_local5
|
|
f13_local3:registerAnimationState( f13_local13, {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
alpha = math.random( f13_local9, f13_local10 ) * 0.01,
|
|
top = 0.5 * f0_local16( f13_local11, f13_local12 ),
|
|
left = f0_local16( f13_local11, f13_local12 ),
|
|
bottom = 0.5 * f0_local16( f13_local11, f13_local12 ),
|
|
right = f0_local16( f13_local11, f13_local12 )
|
|
} )
|
|
f13_local4[f13_local5] = {
|
|
f13_local13,
|
|
f13_local1[f13_local5][2]
|
|
}
|
|
end
|
|
local f13_local5 = MBh.AnimateSequence( f13_local4 )
|
|
f13_local5( f13_local3 )
|
|
end
|
|
|
|
local f0_local20 = function ( f14_arg0, f14_arg1 )
|
|
if f14_arg0.is_paused then
|
|
return
|
|
elseif f14_arg1.value == 0 then
|
|
f14_arg0.minimapHud:dispatchEventToChildren( {
|
|
name = "hud_nosignal_off"
|
|
} )
|
|
f14_arg0.empStatic:processEvent( {
|
|
name = "hud_static_off"
|
|
} )
|
|
f14_arg0.empNoSignal:processEvent( {
|
|
name = "hud_nosignal_off"
|
|
} )
|
|
local f14_local0 = f14_arg0:getChildById( "shakeContainerHudId" )
|
|
f14_local0:animateToState( "default" )
|
|
elseif f14_arg1.value == 3 then
|
|
f14_arg0.minimapHud:dispatchEventToChildren( {
|
|
name = "hud_nosignal_on"
|
|
} )
|
|
f14_arg0.empStatic:processEvent( {
|
|
name = "hud_static_off"
|
|
} )
|
|
f14_arg0.empNoSignal:processEvent( {
|
|
name = "hud_nosignal_on"
|
|
} )
|
|
local f14_local0 = f14_arg0:getChildById( "shakeContainerHudId" )
|
|
f14_local0:animateToState( "default" )
|
|
else
|
|
f14_arg0.minimapHud:dispatchEventToChildren( {
|
|
name = "hud_static"
|
|
} )
|
|
f0_local19( f14_arg0, f14_arg1 )
|
|
f14_arg0.empNoSignal:processEvent( {
|
|
name = "hud_nosignal_off"
|
|
} )
|
|
end
|
|
end
|
|
|
|
local f0_local21 = function ( f15_arg0, f15_arg1 )
|
|
f15_arg0.doRandomShake = true
|
|
f0_local0 = Engine.GetDvarFloat( "safeArea_adjusted_horizontal" )
|
|
f0_local1 = Engine.GetDvarFloat( "safeArea_adjusted_vertical" )
|
|
local f15_local0 = f15_arg0:getChildById( "shakeContainerHudId" )
|
|
local f15_local1 = {}
|
|
f15_local1 = GameX.GetScreenDims()
|
|
for f15_local2 = 1, 4, 1 do
|
|
f15_local0:registerAnimationState( "shake" .. f15_local2, {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
top = f15_local1[2] * (1 - f0_local1) / 2 + math.random( 10, 20 ),
|
|
left = f15_local1[1] * (1 - f0_local0) / 2 + math.random( 10, 20 ),
|
|
bottom = -(f15_local1[2] * (1 - f0_local1)) / 2 - math.random( 10, 20 ),
|
|
right = -(f15_local1[1] * (1 - f0_local0)) / 2 - math.random( 10, 20 ),
|
|
alpha = math.random( 0, 50 ) / 100
|
|
} )
|
|
end
|
|
local f15_local2 = MBh.AnimateSequence
|
|
local f15_local3 = {}
|
|
local f15_local4 = {
|
|
"default",
|
|
0
|
|
}
|
|
local f15_local5 = {}
|
|
local f15_local6 = "shake1"
|
|
local f15_local7 = math.random( 10, 50 )
|
|
f15_local5 = f15_local6
|
|
f15_local6 = {}
|
|
f15_local7 = "shake2"
|
|
local f15_local8 = math.random( 10, 50 )
|
|
f15_local6 = f15_local7
|
|
f15_local7 = {}
|
|
f15_local8 = "shake3"
|
|
local f15_local9 = math.random( 10, 50 )
|
|
f15_local7 = f15_local8
|
|
f15_local8 = {}
|
|
f15_local9 = "shake4"
|
|
local f15_local10 = math.random( 10, 50 )
|
|
f15_local8 = f15_local9
|
|
f15_local9 = {}
|
|
f15_local10 = "hud_off"
|
|
local f15_local11 = math.random( 50, 100 )
|
|
f15_local9 = f15_local10
|
|
f15_local10 = {
|
|
"default",
|
|
250
|
|
}
|
|
f15_local3[1] = f15_local4
|
|
f15_local3[2] = f15_local5
|
|
f15_local3[3] = f15_local6
|
|
f15_local3[4] = f15_local7
|
|
f15_local3[5] = f15_local8
|
|
f15_local3[6] = f15_local9
|
|
f15_local3[7] = f15_local10
|
|
f15_local3 = f15_local2( f15_local3 )
|
|
f15_local3( f15_local0 )
|
|
f15_arg0.doRandomShake = undefined
|
|
end
|
|
|
|
local f0_local22 = function ( f16_arg0, f16_arg1 )
|
|
local f16_local0 = Game.GetOmnvar( "ui_light_armor" )
|
|
local f16_local1 = Engine.GetDvarInt( "ui_juiced_end_milliseconds" )
|
|
local f16_local2 = Game.GetOmnvar( "ui_cranked_bomb_timer_end_milliseconds" )
|
|
local f16_local3 = Game.GetOmnvar( "ui_trigger_happy" )
|
|
if f16_local1 > 0 then
|
|
if f16_arg0.current_state ~= "juiced" then
|
|
local f16_local4 = f16_arg0:getChildById( "bottomLeftCornerId" )
|
|
local f16_local5 = f16_arg0:getChildById( "bottomRightCornerId" )
|
|
f16_local4:animateToState( "juiced", 250 )
|
|
f16_local5:animateToState( "juiced", 250 )
|
|
f16_arg0.current_state = "juiced"
|
|
end
|
|
elseif f16_local2 > 0 then
|
|
if f16_arg0.current_state ~= "cranked" then
|
|
local f16_local4 = f16_arg0:getChildById( "bottomLeftCornerId" )
|
|
local f16_local5 = f16_arg0:getChildById( "bottomRightCornerId" )
|
|
f16_local4:animateToState( "cranked", 250 )
|
|
f16_local5:animateToState( "cranked", 250 )
|
|
f16_arg0.current_state = "cranked"
|
|
end
|
|
elseif f16_local0 then
|
|
if f16_arg0.current_state ~= "light_armor" then
|
|
local f16_local4 = f16_arg0:getChildById( "bottomLeftCornerId" )
|
|
local f16_local5 = f16_arg0:getChildById( "bottomRightCornerId" )
|
|
f16_local4:animateToState( "light_armor", 250 )
|
|
f16_local5:animateToState( "light_armor", 250 )
|
|
f16_arg0.current_state = "light_armor"
|
|
end
|
|
elseif f16_local3 then
|
|
if f16_arg0.current_state ~= "trigger_happy" then
|
|
local f16_local4 = f16_arg0:getChildById( "bottomLeftCornerId" )
|
|
local f16_local5 = f16_arg0:getChildById( "bottomRightCornerId" )
|
|
f16_local4:animateToState( "trigger_happy", 250 )
|
|
f16_local5:animateToState( "trigger_happy", 250 )
|
|
f16_arg0.current_state = "trigger_happy"
|
|
end
|
|
elseif f16_arg0.current_state ~= "default" then
|
|
local f16_local4 = f16_arg0:getChildById( "topLeftCornerId" )
|
|
local f16_local5 = f16_arg0:getChildById( "bottomLeftCornerId" )
|
|
local f16_local6 = f16_arg0:getChildById( "topRightCornerId" )
|
|
local f16_local7 = f16_arg0:getChildById( "bottomRightCornerId" )
|
|
local f16_local8 = MBh.AnimateSequence( {
|
|
{
|
|
"inactive",
|
|
500
|
|
},
|
|
{
|
|
"default",
|
|
500
|
|
}
|
|
} )
|
|
f16_local8( f16_local4 )
|
|
f16_local8( f16_local5 )
|
|
f16_local8( f16_local6 )
|
|
f16_local8( f16_local7 )
|
|
f16_arg0.current_state = "default"
|
|
end
|
|
end
|
|
|
|
local f0_local23 = {
|
|
alpha = 1
|
|
}
|
|
local f0_local24 = {
|
|
alpha = 0
|
|
}
|
|
local f0_local25 = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
top = 0,
|
|
left = 0,
|
|
bottom = 0,
|
|
right = 0,
|
|
alpha = 1
|
|
}
|
|
local f0_local26 = function ( f17_arg0 )
|
|
local f17_local0 = {
|
|
alpha = 1
|
|
}
|
|
local f17_local1 = {
|
|
alpha = 0
|
|
}
|
|
local f17_local2 = {}
|
|
f17_local2 = GameX.GetAdjustedSafeZoneSize()
|
|
local f17_local3 = {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
left = f17_local2[1],
|
|
top = f17_local2[2],
|
|
right = f17_local2[3],
|
|
bottom = f17_local2[4],
|
|
alpha = 1
|
|
}
|
|
f17_arg0:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
left = f17_local2[1],
|
|
top = f17_local2[2],
|
|
right = f17_local2[3],
|
|
bottom = f17_local2[4],
|
|
alpha = 0
|
|
} )
|
|
f17_arg0:registerAnimationState( "default_on", f17_local3 )
|
|
f17_arg0:registerAnimationState( "hud_on", f17_local0 )
|
|
f17_arg0:registerAnimationState( "hud_off", f17_local1 )
|
|
f17_arg0:animateToState( "default" )
|
|
end
|
|
|
|
local f0_local27 = LUI.MenuBuilder.BuildAddChild
|
|
local f0_local28 = function ( menu, controller )
|
|
local self = LUI.UIElement.new()
|
|
self.id = menu
|
|
if Engine.IsConsoleGame() then
|
|
local f18_local1 = {}
|
|
f18_local1 = GameX.GetAdjustedSafeZoneSize()
|
|
local f18_local2 = {}
|
|
f18_local2 = GameX.GetScreenDims()
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = -(f18_local2[2] / 2) - (f18_local1[2] + f18_local1[4]) / 2,
|
|
width = f18_local2[1],
|
|
height = f18_local2[2],
|
|
alpha = 1
|
|
} )
|
|
else
|
|
self:registerAnimationState( "default", f0_local25 )
|
|
end
|
|
self:registerAnimationState( "hud_on", f0_local23 )
|
|
self:registerAnimationState( "hud_off", f0_local24 )
|
|
self:animateToState( "default" )
|
|
f0_local27( self, {
|
|
type = controller
|
|
} )
|
|
return self
|
|
end
|
|
|
|
local f0_local29 = function ( menu, controller )
|
|
local self = LUI.UIElement.new()
|
|
self.id = menu
|
|
self:registerAnimationState( "default", f0_local25 )
|
|
self:registerAnimationState( "hud_on", f0_local23 )
|
|
self:registerAnimationState( "hud_off", f0_local24 )
|
|
self:animateToState( "default" )
|
|
f0_local27( self, {
|
|
type = controller
|
|
} )
|
|
return self
|
|
end
|
|
|
|
local f0_local30 = function ( f20_arg0, f20_arg1 )
|
|
local f20_local0 = RegisterMaterial( "hud_corner_blue" )
|
|
local f20_local1 = RegisterMaterial( "hud_corner_green" )
|
|
local f20_local2 = RegisterMaterial( "hud_corner_red" )
|
|
local self = LUI.UIImage.new()
|
|
self.id = f20_arg0
|
|
self:registerAnimationState( "default", f20_arg1 )
|
|
self:animateToState( "default", 0 )
|
|
self:registerAnimationState( "inactive", {
|
|
alpha = 0
|
|
} )
|
|
self:registerAnimationState( "light_armor", {
|
|
material = f20_local1,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "juiced", {
|
|
material = f20_local0,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "cranked", {
|
|
material = f20_local2,
|
|
alpha = 1
|
|
} )
|
|
self:registerAnimationState( "trigger_happy", {
|
|
material = f20_local0,
|
|
alpha = 1
|
|
} )
|
|
return self
|
|
end
|
|
|
|
local f0_local31 = function ( f21_arg0, f21_arg1 )
|
|
if not MLG.IsMLGSpectator() then
|
|
local f21_local0 = {
|
|
"team_select_main",
|
|
"class_select_main"
|
|
}
|
|
local f21_local1 = f21_local0[f21_arg1.value]
|
|
if f21_local1 then
|
|
f21_arg0.is_paused = true
|
|
LUI.FlowManager.RequestAddMenuAndSetStack( f21_arg0, f21_local1, true, f21_arg1.controller, false, false, {
|
|
{
|
|
name = "mp_pause_menu"
|
|
}
|
|
} )
|
|
f21_arg0:dispatchEventToRoot( {
|
|
name = "hud_refresh",
|
|
target = f21_arg0
|
|
} )
|
|
end
|
|
elseif f21_arg1.value == 2 then
|
|
local f21_local0 = Engine.GetLuiRoot()
|
|
if not f21_local0.hudManager.MLGHud then
|
|
f21_arg0:dispatchEventToRoot( {
|
|
name = "close_hud"
|
|
} )
|
|
f21_arg0:dispatchEventToRoot( {
|
|
name = "init_hud"
|
|
} )
|
|
Engine.NotifyServer( "class_select", 0 )
|
|
end
|
|
end
|
|
end
|
|
|
|
local f0_local32 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "hud_id"
|
|
f0_local26( self )
|
|
self:registerOmnvarHandler( "ui_round_end", function ( f23_arg0, f23_arg1 )
|
|
if f23_arg1.value > 0 then
|
|
f23_arg0:dispatchEventToRoot( {
|
|
name = "round_end_show"
|
|
} )
|
|
end
|
|
end )
|
|
self:registerOmnvarHandler( "ui_options_menu", f0_local31 )
|
|
local f22_local1 = Engine.GetLuiRoot()
|
|
local f22_local2 = tonumber( string.sub( f22_local1.name, 7 ) )
|
|
if not f22_local1.hudManager.hudPreviouslyOpened then
|
|
self:dispatchEventToRoot( {
|
|
name = "omnvar_update",
|
|
omnvar = "ui_options_menu",
|
|
value = Game.GetOmnvar( "ui_options_menu" ),
|
|
controller = f22_local2
|
|
} )
|
|
end
|
|
self:registerEventHandler( "hud_refresh", function ( element, event )
|
|
f0_local5( element, event )
|
|
local f24_local0 = element:getChildById( "shakeContainerHudId" )
|
|
local f24_local1 = f24_local0:getChildById( "lowAmmoWarningHudId" )
|
|
f24_local1:processEvent( event )
|
|
f24_local1 = f24_local0:getChildById( "weaponInfoHudId" )
|
|
local f24_local2 = f24_local1:getChildById( "weaponInfoHud" )
|
|
local f24_local3 = f24_local2:getChildById( "killstreakInfoHud" )
|
|
f24_local3:processEvent( event )
|
|
local f24_local4 = element:getChildById( "cornersHudId" )
|
|
f24_local4:processEvent( event )
|
|
f24_local4 = element:getChildById( "spectatorHudId" )
|
|
f24_local4:processEvent( event )
|
|
end )
|
|
self:registerEventHandler( "hud_shake", f0_local21 )
|
|
self:registerEventHandler( "toggle_pause", f0_local8 )
|
|
self:registerEventHandler( "toggle_pause_off", f0_local7 )
|
|
self:registerEventHandler( "show_host_migration_triggered", f0_local9 )
|
|
self:registerEventHandler( "hide_host_migration", f0_local10 )
|
|
self:registerOmnvarHandler( "ui_pause_menu_show", f0_local7 )
|
|
self:registerOmnvarHandler( "ui_hud_shake", f0_local11 )
|
|
self:registerOmnvarHandler( "ui_hud_emp_artifact", f0_local12 )
|
|
self:registerOmnvarHandler( "ui_hud_static", f0_local20 )
|
|
f0_local27( self, {
|
|
type = "weaponAttachmentProcessing",
|
|
id = "weapAttachment"
|
|
} )
|
|
f0_local27( self, {
|
|
type = "blurProcessing",
|
|
id = "blurProcessing"
|
|
} )
|
|
f0_local27( self, {
|
|
type = "UITimer",
|
|
id = "hudRefreshTimer",
|
|
properties = {
|
|
event = "hud_refresh",
|
|
group = "hud",
|
|
interval = 200
|
|
}
|
|
} )
|
|
f0_local27( self, f0_local28( "cornersHudId", "fourCornersHudDef" ) )
|
|
f0_local27( self, f0_local28( "overlayHudId", "overlayHudDef" ) )
|
|
f0_local27( self, f0_local28( "gameMessageHudId", "gameMessageHudDef" ) )
|
|
f0_local27( self, f0_local28( "hintsHudId", "hintsHudDef" ) )
|
|
f0_local27( self, f0_local28( "killCamHudId", "killCamHudDef" ) )
|
|
f0_local27( self, f0_local28( "lowHealthHudId", "lowHealthHudDef" ) )
|
|
f0_local27( self, f0_local28( "pointsPopupHudId", "pointsPopupHudDef" ) )
|
|
run_gc()
|
|
f0_local27( self, f0_local28( "screenEffectsHudDef", "screenEffectsHudDef" ) )
|
|
f0_local27( self, f0_local28( "matchStartHudId", "matchStartHudDef" ) )
|
|
f0_local27( self, f0_local29( "matchStartObjectiveHudId", "matchStartObjectiveHudDef" ) )
|
|
f0_local27( self, f0_local29( "spectatorHudId", "spectatorHudDef" ) )
|
|
f0_local27( self, f0_local28( "damageFeedbackHudId", "damageFeedbackHudDef" ) )
|
|
f0_local27( self, f0_local28( "hudIconTypeHudId", "hudIconTypeHudDef" ) )
|
|
if Engine.IsPS4() then
|
|
f0_local27( self, f0_local29( "vitaHudId", "vitaHudDef" ) )
|
|
end
|
|
f22_local1 = LUI.UIElement.new()
|
|
f22_local1.id = "shakeContainerHudId"
|
|
f22_local1:registerAnimationState( "default", f0_local25 )
|
|
f22_local1:registerAnimationState( "hud_on", f0_local23 )
|
|
f22_local1:registerAnimationState( "hud_off", f0_local24 )
|
|
f22_local1:animateToState( "default" )
|
|
f22_local1.properties = {
|
|
shakeLooping = 0,
|
|
shakeVersion = 0
|
|
}
|
|
self:addElement( f22_local1 )
|
|
f0_local27( f22_local1, f0_local29( "weaponInfoHudId", "weaponInfoHudDef" ) )
|
|
f0_local27( f22_local1, {
|
|
type = "UIElement",
|
|
id = "killstreakVisHandlerId",
|
|
handlers = {
|
|
hud_on = function ( f25_arg0 )
|
|
local f25_local0 = f25_arg0:getParent()
|
|
f25_local0 = f25_local0:getChildById( "weaponInfoHudId" )
|
|
f25_local0:processEvent( {
|
|
name = "show_ks_info"
|
|
} )
|
|
end,
|
|
hud_off = function ( f26_arg0 )
|
|
local f26_local0 = f26_arg0:getParent()
|
|
f26_local0 = f26_local0:getChildById( "weaponInfoHudId" )
|
|
f26_local0:processEvent( {
|
|
name = "hide_ks_info"
|
|
} )
|
|
end
|
|
}
|
|
} )
|
|
run_gc()
|
|
f0_local27( f22_local1, f0_local29( "playerInfoHudId", "playerInfoHudDef" ) )
|
|
self.minimapHud = f0_local27( f22_local1, f0_local29( "minimapHudId", "minimapHudDef" ) )
|
|
self.empNoSignal = self.minimapHud:getFirstDescendentById( "minimapNoSignal" )
|
|
self.empArtifact = self.minimapHud:getFirstDescendentById( "minimapArtifact" )
|
|
self.empStatic = self.minimapHud:getFirstDescendentById( "minimapStatic" )
|
|
f0_local27( f22_local1, f0_local29( "lowAmmoWarningHudId", "lowAmmoWarningHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "captureHudId", "captureHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "teamScoresHudId", "teamScoresHudDef" ) )
|
|
run_gc()
|
|
f0_local27( f22_local1, f0_local29( "scorelistHudId", "scorelistHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "intelInfoHudId", "intelInfoHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "splashesHudId", "splashesHudDef" ) )
|
|
if not Engine.UsingSplitscreenUpscaling() then
|
|
f0_local27( f22_local1, f0_local29( "perksOnSpawnHudId", "perksOnSpawnHudDef" ) )
|
|
end
|
|
f22_local2 = Engine.GetDvarString( "ui_gametype" )
|
|
local f22_local3 = Engine.GetDvarString( "ui_mapname" )
|
|
if f22_local2 == "fireteam" then
|
|
f0_local27( f22_local1, f0_local28( "fireTeamHudId", "fireTeamHudDef" ) )
|
|
end
|
|
if f22_local2 == "horde" then
|
|
f0_local27( f22_local1, f0_local29( "hordeHudId", "hordeHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "hordeRoundHudId", "hordeRoundHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "hordePerksHudId", "hordePerksHudDef" ) )
|
|
f0_local27( f22_local1, f0_local29( "hordeExpAmmoHudId", "hordeExpAmmoHudDef" ) )
|
|
end
|
|
if f22_local2 == "sd" or f22_local2 == "sr" then
|
|
f0_local27( f22_local1, f0_local29( "bombPlantDefuseHudId", "bombPlantDefuseHudDef" ) )
|
|
end
|
|
if f22_local2 == "dom" or f22_local2 == "siege" then
|
|
f0_local27( f22_local1, f0_local29( "captureDomHudId", "captureDomHudDef" ) )
|
|
end
|
|
if f22_local2 == "cranked" or f22_local2 == "horde" then
|
|
f0_local27( f22_local1, f0_local29( "crankedBombTimerHudId", "crankedBombTimerHudDef" ) )
|
|
end
|
|
if f22_local3 == "mp_dig" then
|
|
f0_local27( f22_local1, f0_local29( "digKillstreakHudId", "digKillstreakHudDef" ) )
|
|
end
|
|
return self
|
|
end
|
|
|
|
local f0_local33 = function ()
|
|
local f27_local0 = RegisterMaterial( "hud_corner" )
|
|
local self = LUI.UIElement.new()
|
|
self.id = "fourCornersHudId"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
self:registerEventHandler( "hud_refresh", f0_local22 )
|
|
local f27_local2 = f0_local30( "topLeftCornerId", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = false,
|
|
rightAnchor = false,
|
|
top = 0,
|
|
left = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f27_local0,
|
|
alpha = 1,
|
|
zRot = 180
|
|
} )
|
|
local f27_local3 = f0_local30( "bottomLeftCornerId", {
|
|
topAnchor = false,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = false,
|
|
bottom = 0,
|
|
left = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f27_local0,
|
|
alpha = 1,
|
|
zRot = 270
|
|
} )
|
|
local f27_local4 = f0_local30( "bottomRightCornerId", {
|
|
topAnchor = false,
|
|
leftAnchor = false,
|
|
bottomAnchor = true,
|
|
rightAnchor = true,
|
|
bottom = 0,
|
|
right = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f27_local0,
|
|
alpha = 1,
|
|
zRot = 0
|
|
} )
|
|
local f27_local5 = f0_local30( "topRightCornerId", {
|
|
topAnchor = true,
|
|
leftAnchor = false,
|
|
bottomAnchor = false,
|
|
rightAnchor = true,
|
|
top = 0,
|
|
right = 0,
|
|
height = 512,
|
|
width = 512,
|
|
material = f27_local0,
|
|
alpha = 1,
|
|
zRot = 90
|
|
} )
|
|
self:addElement( f27_local2 )
|
|
self:addElement( f27_local3 )
|
|
self:addElement( f27_local4 )
|
|
self:addElement( f27_local5 )
|
|
return self
|
|
end
|
|
|
|
local f0_local34 = function ()
|
|
local self = LUI.UIElement.new()
|
|
self.id = "hintsContainerHudId"
|
|
self:registerAnimationState( "default", {
|
|
topAnchor = true,
|
|
leftAnchor = true,
|
|
bottomAnchor = true,
|
|
rightAnchor = true
|
|
} )
|
|
self:animateToState( "default", 0 )
|
|
local f28_local1 = LUI.mp_hud.Hints.mantleHintDef()
|
|
local f28_local2 = LUI.mp_hud.Hints.cursorHintDef()
|
|
local f28_local3 = LUI.mp_hud.Hints.invalidCmdHintDef()
|
|
local f28_local4 = LUI.mp_hud.Hints.breathHintDef()
|
|
local f28_local5 = LUI.mp_hud.Hints.zoomHintDef()
|
|
local f28_local6 = LUI.mp_hud.Hints.toggleHybridHintDef()
|
|
local f28_local7 = LUI.mp_hud.Hints.toggleThermalHintDef()
|
|
self:addElement( f28_local1 )
|
|
self:addElement( f28_local2 )
|
|
self:addElement( f28_local3 )
|
|
self:addElement( f28_local4 )
|
|
self:addElement( f28_local5 )
|
|
self:addElement( f28_local6 )
|
|
self:addElement( f28_local7 )
|
|
return self
|
|
end
|
|
|
|
local f0_local35 = function ()
|
|
return {
|
|
type = "hud",
|
|
id = "hud_720_id"
|
|
}
|
|
end
|
|
|
|
LUI.MenuBuilder.registerType( "fourCornersHudDef", f0_local33 )
|
|
LUI.MenuBuilder.registerType( "hintsHudDef", f0_local34 )
|
|
LUI.MenuBuilder.registerType( "hud", f0_local32 )
|
|
LUI.MenuBuilder.registerDef( "hud_720", f0_local35 )
|
|
LUI.HudManager.registerHud( "hud_720" )
|
|
LockTable( _M )
|