Machine subsystem now checks qdel status (#29073)

If an item is qdeleted, it is not queued for processing and removed
from the processing list (if it's not already gone)

This will prevent machines getting processed when qdeleted (due to being
cached in the subsystem current run list)
This commit is contained in:
oranges
2017-07-06 22:46:38 -05:00
committed by Cheridan
parent 5fba57358b
commit b825ca1545
+2 -2
View File
@@ -39,12 +39,12 @@ SUBSYSTEM_DEF(machines)
while(currentrun.len)
var/obj/machinery/thing = currentrun[currentrun.len]
currentrun.len--
if(thing && thing.process(seconds) != PROCESS_KILL)
if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
if(thing.use_power)
thing.auto_use_power() //add back the power state
else
processing -= thing
if (thing)
if (!QDELETED(thing))
thing.isprocessing = 0
if (MC_TICK_CHECK)
return