Merge pull request #1509 from Abi79/master

Minor zone/proc/Rebuild() optimization
This commit is contained in:
CIB
2012-07-22 05:02:53 -07:00
+2 -5
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