diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 043285d6b5e..4e90d763e9e 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -121,13 +121,15 @@ update_inv_glasses() else if(I == head) head = null - var/obj/item/clothing/head/hat = I - if(hat.flags & BLOCKHAIR || hat.flags & BLOCKHEADHAIR) + if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR) update_hair() //rebuild hair update_fhair() update_head_accessory() - if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view) - update_sight() + // Bandanas and paper hats go on the head but are not head clothing + if(istype(I,/obj/item/clothing/head)) + var/obj/item/clothing/head/hat = I + if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view) + update_sight() head_update(I) update_inv_head() else if(I == r_ear) @@ -274,13 +276,15 @@ update_inv_gloves(redraw_mob) if(slot_head) head = W - var/obj/item/clothing/head/hat = W if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair update_fhair(redraw_mob) update_head_accessory(redraw_mob) - if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view) - update_sight() + // paper + bandanas + if(istype(W, /obj/item/clothing/head)) + var/obj/item/clothing/head/hat = W + if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view) + update_sight() head_update(W) update_inv_head(redraw_mob) if(slot_shoes)