From b03ff54522c3e07320096c67d75ee3c15e5eee9c Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 2 Mar 2014 23:25:40 -0500 Subject: [PATCH] Singulo optimizations --- code/modules/power/singularity/singularity.dm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index e710ed75bc6..2f5d6dbd220 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -1,8 +1,12 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 +// Added spess ghoasts/cameras to this so they don't add to the lag. - N3X var/global/list/uneatable = list( /turf/space, - /obj/effect/overlay + /obj/effect/overlay, + /mob/dead, + /mob/camera, + /mob/new_player ) /obj/machinery/singularity/ @@ -215,10 +219,13 @@ var/global/list/uneatable = list( defer_powernet_rebuild = 1 // Let's just make this one loop. for(var/atom/X in orange(grav_pull,src)) + // N3X: Move this up here since get_dist is slow. + if(is_type_in_list(X, uneatable)) continue + var/dist = get_dist(X, src) + // Movable atoms only if(dist > consume_range && istype(X, /atom/movable)) - if(is_type_in_list(X, uneatable)) continue if(canPull(X)) step_towards(X,src) /*