Fix 3 server errors (#4578)

* POLARIS: Lighting runtime for accessing a list that might not exist

* POLARIS: Lazily clear these lists

* POLARIS: Just return the normal hint in Destroy on plane holders
This commit is contained in:
Arokha Sieyes
2018-01-18 23:23:43 -05:00
committed by Anewbe
parent e507cf8106
commit 17907b4486
3 changed files with 9 additions and 8 deletions

View File

@@ -53,10 +53,11 @@
// See LIGHTING_CORNER_DIAGONAL in lighting_corner.dm for why these values are what they are.
// No I seriously cannot think of a more efficient method, fuck off Comic.
var/datum/lighting_corner/cr = T.corners[3] || dummy_lighting_corner
var/datum/lighting_corner/cg = T.corners[2] || dummy_lighting_corner
var/datum/lighting_corner/cb = T.corners[4] || dummy_lighting_corner
var/datum/lighting_corner/ca = T.corners[1] || dummy_lighting_corner
var/datum/lighting_corner/cr = LAZYACCESS(T.corners,3) || dummy_lighting_corner
var/datum/lighting_corner/cg = LAZYACCESS(T.corners,2) || dummy_lighting_corner
var/datum/lighting_corner/cb = LAZYACCESS(T.corners,4) || dummy_lighting_corner
var/datum/lighting_corner/ca = LAZYACCESS(T.corners,1) || dummy_lighting_corner
var/max = max(cr.cache_mx, cg.cache_mx, cb.cache_mx, ca.cache_mx)

View File

@@ -57,11 +57,11 @@
for(var/organ in organs)
qdel(organ)
list_layers.Cut()
LAZYCLEARLIST(list_layers)
list_layers = null //Be free!
list_body.Cut()
LAZYCLEARLIST(list_body)
list_body = null
list_huds.Cut()
LAZYCLEARLIST(list_huds)
list_huds = null
return ..()

View File

@@ -40,7 +40,7 @@
my_mob.plane_holder = null
my_mob = null
plane_masters.Cut() //Goodbye my children, be free
..() //We will get qdel'd, as there will not be references to us, then our planelets will disappear on their own.
return ..()
/datum/plane_holder/proc/set_vis(var/which = null, var/state = FALSE)
ASSERT(which)