Merge pull request #3302 from VOREStation/aro-manhuds

Make hud resize more robust for empty lists (manequins)
This commit is contained in:
Aronai Sieyes
2018-03-19 17:01:28 -04:00
committed by GitHub
+7 -6
View File
@@ -85,12 +85,13 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
update_transform() //Lame way
/mob/living/carbon/human/resize(var/new_size, var/animate = TRUE)
if(..()) return 1
var/new_y_offset = 32 * (size_multiplier - 1)
for(var/index = 1 to hud_list.len)
var/image/HI = grab_hud(index)
HI.pixel_y = new_y_offset
apply_hud(index, HI)
. = ..()
if(LAZYLEN(hud_list) && has_huds)
var/new_y_offset = 32 * (size_multiplier - 1)
for(var/index = 1 to hud_list.len)
var/image/HI = grab_hud(index)
HI.pixel_y = new_y_offset
apply_hud(index, HI)
// Optimize mannequins - never a point to animating or doing HUDs on these.
/mob/living/carbon/human/dummy/mannequin/resize(var/new_size, var/animate = TRUE)