mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-07 21:59:49 -05:00
HUD: fix health bar afterlife update bit
HUD: change health bar LUI event name
This commit is contained in:
parent
08d131e1e5
commit
b9f00cc9c2
@ -185,14 +185,16 @@ init()
|
||||
precache_strings()
|
||||
{
|
||||
precacheString(&"set_dvar_from_dvar");
|
||||
precacheString(&"hud_update_health");
|
||||
precacheString(&"hud_update_zone_name");
|
||||
precacheString(&"hud_fade_out_zone_name");
|
||||
precacheString(&"hud_fade_in_zone_name");
|
||||
|
||||
precacheString(&"r_fog");
|
||||
precacheString(&"r_fog_settings");
|
||||
|
||||
precacheString(&"hud_update_health_bar");
|
||||
precacheString(&"hud_update_zone_name");
|
||||
|
||||
precacheString(&"hud_fade_out_zone_name");
|
||||
precacheString(&"hud_fade_in_zone_name");
|
||||
|
||||
foreach (zone_name in level.zone_keys)
|
||||
{
|
||||
precacheString(istring(toupper(level.script + "_" + zone_name)));
|
||||
@ -741,7 +743,7 @@ health_bar_hud()
|
||||
|
||||
if (player.health != vars["prev_health"] || player.maxhealth != vars["prev_maxhealth"] || shield_health != vars["prev_shield_health"])
|
||||
{
|
||||
self luinotifyevent(&"hud_update_health", 3, player.health, player.maxhealth, shield_health);
|
||||
self luinotifyevent(&"hud_update_health_bar", 3, player.health, player.maxhealth, shield_health);
|
||||
}
|
||||
|
||||
vars["prev_health"] = player.health;
|
||||
|
@ -55,7 +55,7 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
||||
|
||||
healthBarWidget:registerEventHandler("hud_update_refresh", CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_HUD_VISIBLE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_IN_AFTERLIFE, CoD.Perks.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_IN_AFTERLIFE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_EMP_ACTIVE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
@ -70,7 +70,7 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_PLAYER_DEAD, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_SCOPED, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_ZOMBIE, CoD.Reimagined.HealthBarArea.UpdateVisibility)
|
||||
healthBarWidget:registerEventHandler("hud_update_health", CoD.Reimagined.HealthBarArea.UpdateHealthBar)
|
||||
healthBarWidget:registerEventHandler("hud_update_health_bar", CoD.Reimagined.HealthBarArea.UpdateHealthBar)
|
||||
|
||||
local x = 7
|
||||
local y = -167
|
||||
@ -81,7 +81,6 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
||||
zoneNameWidget:setAlpha(0)
|
||||
zoneNameWidget.width = width
|
||||
zoneNameWidget.height = height
|
||||
zoneNameWidget.bgDiff = bgDiff
|
||||
safeArea:addElement(zoneNameWidget)
|
||||
|
||||
local zoneNameText = LUI.UIText.new()
|
||||
|
Loading…
x
Reference in New Issue
Block a user