From d6b275ca7381440f2f4f8fbb10778f07c3b3176f Mon Sep 17 00:00:00 2001 From: Aryn Date: Sat, 22 Feb 2014 08:16:35 -0700 Subject: [PATCH] Fixed walls not splitting zones. --- code/ZAS/Zone.dm | 1 + code/ZAS/_docs.dm | 2 +- code/game/turfs/turf.dm | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/ZAS/Zone.dm b/code/ZAS/Zone.dm index 8373771ae26..17d6097cdaf 100644 --- a/code/ZAS/Zone.dm +++ b/code/ZAS/Zone.dm @@ -107,6 +107,7 @@ Class Procs: #endif /zone/proc/rebuild() + if(invalid) return //Short circuit for explosions where rebuild is called many times over. c_invalidate() for(var/turf/simulated/T in contents) //T.dbg(invalid_zone) diff --git a/code/ZAS/_docs.dm b/code/ZAS/_docs.dm index 8d084dc4c95..26bb4d3b215 100644 --- a/code/ZAS/_docs.dm +++ b/code/ZAS/_docs.dm @@ -27,7 +27,7 @@ Notes for people who used ZAS before: */ -//#define ZASDBG +#define ZASDBG //#define ZLEVELS #define AIR_BLOCKED 1 diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b172024579e..57e9aab94cb 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -221,9 +221,11 @@ if(connections) connections.erase_all() if(istype(src,/turf/simulated)) - //world << "Removed from zone." + //Yeah, we're just going to rebuild the whole thing. + //Despite this being called a bunch during explosions, + //the zone will only really do heavy lifting once. var/turf/simulated/S = src - if(S.zone) S.zone.remove(S) + if(S.zone) S.zone.rebuild() if(ispath(N, /turf/simulated/floor)) //if the old turf had a zone, connect the new turf to it as well - Cael