From 6960325fbb3271324b421cfb89035df306b261bb Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Wed, 18 May 2016 20:27:50 -0400 Subject: [PATCH] Fixes runtimes with rigs Naked and trying to wear a rig, it will attempt to access w_uniform.inv_flags which will be null and runtime. Moves shoe redrawing to uniform and suit update_inv code in update_icons, rather than in inventory.dm. update_icons already had code for this. --- code/modules/mob/living/carbon/human/inventory.dm | 2 -- code/modules/mob/living/carbon/human/update_icons.dm | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 4cbde15ff13..5dacc500dc4 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -267,8 +267,6 @@ This saves us from having to call add_fingerprint() any time something is put in update_inv_shoes(redraw_mob) if(slot_wear_suit) src.wear_suit = W - if((wear_suit.flags_inv & HIDESHOES) || (w_uniform.flags_inv & HIDESHOES)) - update_inv_shoes(0) W.equipped(src, slot) update_inv_wear_suit(redraw_mob) if(slot_w_uniform) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index b15db41f512..49ae38e7894 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -499,6 +499,9 @@ var/global/list/damage_icon_parts = list() else overlays_standing[UNIFORM_LAYER] = null + //hiding/revealing shoes if necessary + update_inv_shoes(0) + if(update_icons) update_icons() @@ -774,10 +777,12 @@ var/global/list/damage_icon_parts = list() else overlays_standing[SUIT_LAYER] = null update_tail_showing(0) - update_inv_shoes(0) update_collar(0) + //hide/show shoes if necessary + update_inv_shoes(0) + if(update_icons) update_icons() /mob/living/carbon/human/update_inv_pockets(var/update_icons=1)