mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Fixes #993
Calls the final HUD update later (higher, in mob/death) since stat was not yet DEAD (2) when it was called before. Also makes all mobs update the HUDs all life() ticks, so people who have ghosted and left a body have correct HUD readings. If this affects performance, sorry? ... It really shouldn't. Only carbons should have real HUDs to update. The rest are tiny little procs.
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
dead_mob_list |= src
|
||||
|
||||
updateicon()
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
BITSET(hud_updateflag, STATUS_HUD)
|
||||
BITSET(hud_updateflag, LIFE_HUD)
|
||||
|
||||
handle_hud_list()
|
||||
|
||||
//Handle species-specific deaths.
|
||||
species.handle_death(src)
|
||||
animate_tail_stop()
|
||||
|
||||
@@ -1555,7 +1555,7 @@
|
||||
/mob/living/carbon/human/proc/handle_hud_list()
|
||||
if (BITTEST(hud_updateflag, HEALTH_HUD))
|
||||
var/image/holder = hud_list[HEALTH_HUD]
|
||||
if(stat == 2)
|
||||
if(stat == DEAD)
|
||||
holder.icon_state = "hudhealth-100" // X_X
|
||||
else
|
||||
var/percentage_health = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100)
|
||||
@@ -1579,7 +1579,7 @@
|
||||
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/image/holder2 = hud_list[STATUS_HUD_OOC]
|
||||
if(stat == 2)
|
||||
if(stat == DEAD)
|
||||
holder.icon_state = "huddead"
|
||||
holder2.icon_state = "huddead"
|
||||
else if(status_flags & XENO_HOST)
|
||||
|
||||
@@ -53,8 +53,7 @@
|
||||
|
||||
update_canmove()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
handle_regular_hud_updates()
|
||||
|
||||
/mob/living/proc/handle_breathing()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user