From a50286e5e8f184c1cd8bbded60e56c4dcdb8122c Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Thu, 19 May 2016 13:30:12 -0400 Subject: [PATCH] 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. --- code/modules/mob/death.dm | 1 + code/modules/mob/living/carbon/human/death.dm | 2 -- code/modules/mob/living/carbon/human/life.dm | 4 ++-- code/modules/mob/living/life.dm | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 906fe22521..4b6598cf1b 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -85,6 +85,7 @@ dead_mob_list |= src updateicon() + handle_regular_hud_updates() if(ticker && ticker.mode) ticker.mode.check_win() diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 368cad0ff7..6a45483251 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 36e418418e..92db14c591 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index c3162b030c..d9a8ad84b4 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -53,8 +53,7 @@ update_canmove() - if(client) - handle_regular_hud_updates() + handle_regular_hud_updates() /mob/living/proc/handle_breathing() return