Minor zone/proc/Rebuild() optimization

This commit is contained in:
Albert Iordache
2012-07-22 14:37:57 +03:00
parent 7bfd16b5fc
commit ac4b8d076a

View File

@@ -229,11 +229,10 @@ zone/proc/Rebuild()
if(!contents.len)
del src
var/list/tried_turfs = list()
var/list/turfs_to_consider = contents.Copy()
do
if(sample)
tried_turfs |= sample
var/list/turfs_to_consider = contents - tried_turfs
turfs_to_consider -= sample
if(!turfs_to_consider.len)
break
sample = pick(turfs_to_consider) //Nor this.
@@ -260,8 +259,6 @@ zone/proc/Rebuild()
T.zone = null
problem = 1
for(var/turf/T in new_contents)
if(problem)
//Build some new zones for stuff that wasn't included.
var/list/turf/simulated/rebuild_turfs = contents - new_contents