Fixes npcpool runtime (#52347)

* Fixes npcpool runtime

* Adds comment

* added warnings for real this time
This commit is contained in:
skoglol
2020-07-21 19:55:25 +02:00
committed by GitHub
parent bfc28ca7e3
commit 7d547dbf9a
2 changed files with 6 additions and 0 deletions
@@ -34,6 +34,7 @@ SUBSYSTEM_DEF(idlenpcpool)
--currentrun.len
if (!SA)
GLOB.simple_animals[AI_IDLE] -= SA
log_world("Found a null in simple_animals list!")
continue
if(!SA.ckey)
+5
View File
@@ -23,6 +23,11 @@ SUBSYSTEM_DEF(npcpool)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
if (!SA) // Some issue causes nulls to get into this list some times. This keeps it running, but the bug is still there.
GLOB.simple_animals[AI_ON] -= SA
log_world("Found a null in simple_animals list!")
continue
if(!SA.ckey && !SA.notransform)
if(SA.stat != DEAD)
SA.handle_automated_movement()