faster loops

This commit is contained in:
Fox-McCloud
2016-01-13 09:08:53 -05:00
parent eb5fcba6c5
commit 2541c8f4b6
+4 -2
View File
@@ -87,7 +87,8 @@
var/list/affected_turfs = trange(max_range, epicenter)
if(config.reactionary_explosions)
for(var/turf/T in affected_turfs) // we cache the explosion block rating of every turf in the explosion area
for(var/A in affected_turfs) // we cache the explosion block rating of every turf in the explosion area
var/turf/T = A
cached_exp_block[T] = 0
if(T.density && T.explosion_block)
cached_exp_block[T] += T.explosion_block
@@ -96,7 +97,8 @@
if(D.density && D.explosion_block)
cached_exp_block[T] += D.explosion_block
for(var/turf/T in affected_turfs)
for(var/A in affected_turfs)
var/turf/T = A
var/dist = cheap_hypotenuse(T.x, T.y, x0, y0)