From f0a7b2466edb54e27f82883b6f796d7c9d59003e Mon Sep 17 00:00:00 2001 From: Anewbe Date: Thu, 5 Jul 2018 14:49:24 -0500 Subject: [PATCH 1/2] Merge pull request #5390 from VOREStation/pol-planetstartup Fixes some planets controller runtimes --- code/controllers/subsystems/planets.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm index 2bb09050f46..3b3675d5c3a 100644 --- a/code/controllers/subsystems/planets.dm +++ b/code/controllers/subsystems/planets.dm @@ -62,7 +62,7 @@ SUBSYSTEM_DEF(planets) while(currentlist.len) var/turf/simulated/OT = currentlist[currentlist.len] currentlist.len-- - if(istype(OT) && z_to_planet[OT.z]) + if(istype(OT) && z_to_planet.len >= OT.z && z_to_planet[OT.z]) var/datum/planet/P = z_to_planet[OT.z] P.planet_floors |= OT OT.vis_contents |= P.weather_holder.visuals @@ -73,7 +73,7 @@ SUBSYSTEM_DEF(planets) while(currentlist.len) var/turf/unsimulated/wall/planetary/PW = currentlist[currentlist.len] currentlist.len-- - if(istype(PW) && z_to_planet[PW.z]) + if(istype(PW) && z_to_planet.len >= PW.z && z_to_planet[PW.z]) var/datum/planet/P = z_to_planet[PW.z] P.planet_walls |= PW if(!initial && MC_TICK_CHECK)