From 4311e32aa106e120a1d555fd6a745c7c0a23c517 Mon Sep 17 00:00:00 2001 From: Verkister Date: Mon, 6 Nov 2017 16:47:32 +0200 Subject: [PATCH] Fixes the severed legs crashing? -Hopefully finally yes. -Got no proper environment to test if it actually fixes the thing, but extensive troubleshooting and pinpointing has eliminated the issue to the rendering of leg icons, which apparently had nothing in it to skip missing ones. -Thing affects both, living mobs and ghosts alike, and being a cached icon generation also explains why it only happens once and not after the victims have rejoined. --- code/modules/mob/living/carbon/human/update_icons.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index f5c3e71999f..e0978042749 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -293,6 +293,8 @@ var/global/list/damage_icon_parts = list() base_icon = chest.get_icon() for(var/obj/item/organ/external/part in organs) + if(isnull(part) || part.is_stump()) + continue var/icon/temp = part.get_icon(skeleton) //That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST //And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)