Resolves a runtime with alt icons.

The runtime occurred when get_icon_state() attempted to handle_alt_icon
on a head, even if if was a stump. Adds sanity to check if it's a stump
or if the organ's destroyed (as how it's handled in update_icons for
mobs) and resolves the runtime and #5863.
This commit is contained in:
KasparoVy
2016-11-09 04:28:51 -05:00
parent 820500a931
commit 0f1ae264f8
+1 -1
View File
@@ -159,7 +159,7 @@ var/global/list/limb_icon_cache = list()
gender = "f"
else
gender = "m"
if(limb_name == "head")
if(limb_name == "head" && !is_stump() && !(status & ORGAN_DESTROYED))
var/obj/item/organ/external/head/head_organ = src
head_organ.handle_alt_icon()