From 6c91d220b81686ea9b10b228d9049445d9ea1637 Mon Sep 17 00:00:00 2001 From: Aryn Date: Sat, 22 Feb 2014 08:45:31 -0700 Subject: [PATCH] Added code protecting against obscure merges of invalid zones. - Usually happened when welding fuel tanks caused secondary explosions. --- code/ZAS/ConnectionGroup.dm | 6 ++++++ code/ZAS/Controller.dm | 3 +++ 2 files changed, 9 insertions(+) diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm index 2c7e4373c0..1486f5088b 100644 --- a/code/ZAS/ConnectionGroup.dm +++ b/code/ZAS/ConnectionGroup.dm @@ -143,6 +143,9 @@ Class Procs: . = ..() /connection_edge/zone/tick() + if(A.invalid || B.invalid) + erase() + return //world << "[id]: Tick [air_master.current_cycle]: \..." if(direct) if(air_master.equivalent_pressure(A, B)) @@ -207,6 +210,9 @@ Class Procs: return A == Z /connection_edge/unsimulated/tick() + if(A.invalid) + erase() + return //world << "[id]: Tick [air_master.current_cycle]: To [B]!" //A.air.mimic(B, coefficient) ShareSpace(A.air,air) diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm index 429906a649..83b4bf3f3b 100644 --- a/code/ZAS/Controller.dm +++ b/code/ZAS/Controller.dm @@ -220,6 +220,8 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun #ifdef ZASDBG ASSERT(istype(A)) ASSERT(istype(B)) + ASSERT(!A.invalid) + ASSERT(!B.invalid) ASSERT(A != B) #endif if(A.contents.len < B.contents.len) @@ -234,6 +236,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun ASSERT(istype(A)) ASSERT(isturf(B)) ASSERT(A.zone) + ASSERT(!A.zone.invalid) //ASSERT(B.zone) ASSERT(A != B) #endif