Merge branch 'master' of https://github.com/Baystation12/Baystation12

Optimizes crew console scanning to only look for mobs instead of ALL clothing items in the world.
This commit is contained in:
Chinsky
2014-06-22 14:30:50 +04:00
parent af60005aad
commit 86db41a582

View File

@@ -107,13 +107,9 @@
/obj/machinery/computer/crew/proc/scan() /obj/machinery/computer/crew/proc/scan()
for(var/obj/item/clothing/under/C in world) for(var/mob/living/carbon/human/H in mob_list)
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human))) if(istype(H.w_uniform, /obj/item/clothing/under))
var/check = 0 var/obj/item/clothing/under/C = H.w_uniform
for(var/O in src.tracked) if (C.has_sensor)
if(O == C) tracked |= C
check = 1
break
if(!check)
src.tracked.Add(C)
return 1 return 1