Disallow nulls in the lighting system's lights list

This bug isn't reproducable so no, I'm not sure this will fix it. It's still a good idea to do this though.

Best guess as to what happened: A light was deleted pre-round for some reason. The garbage ss del()'d the light before the lighting system's first tick, so a null got into the lighting ss's lights list. This broke the whole system directly from roundstart and caused the thousands of "can't run null.check()" runtime errors from yesterday.
This commit is contained in:
MrPerson
2015-10-12 01:52:30 -07:00
parent 16c8eac8e3
commit d97d2a3bac
+2
View File
@@ -58,6 +58,8 @@
remove_effect()
owner.light = null
owner = null
if(changed)
SSlighting.changed_lights -= src
return ..()
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one