hopefully a performance improvement to stop genitalia from having to update everytime.

This commit is contained in:
Ghommie
2019-10-03 19:08:11 +02:00
parent 7c77f2d2e3
commit a65b4d0b1c
3 changed files with 9 additions and 5 deletions
@@ -209,11 +209,10 @@
//procs to handle sprite overlays being applied to humans
/obj/item/equipped(mob/user, slot)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.update_genitals()
/mob/living/carbon/human/equip_to_slot(obj/item/I, slot)
. = ..()
if(!. && !(slot in GLOB.no_genitals_update_slots)) //the item was successfully equipped, and the chosen slot wasn't merely storage or hands.
update_genitals()
/mob/living/carbon/human/doUnEquip(obj/item/I, force)
. = ..()