Sanity check for orphaned ai_holder runtimes

Seems like ai_holder datums take their own sweet time deleting themselves after losing their parent mobs, causing a ton of null holder runtimes during that time window. Now they should be able to sense that their holder mob is gone and avoid that.
This commit is contained in:
Verkister
2019-10-31 20:26:24 +02:00
committed by GitHub
parent c773e0bfab
commit 992400c215

View File

@@ -5,6 +5,9 @@
// If our holder is able to do anything.
/datum/ai_holder/proc/can_act()
if(!holder) // Holder missing.
SSai.processing -= src
return FALSE
if(holder.stat) // Dead or unconscious.
ai_log("can_act() : Stat was non-zero ([holder.stat]).", AI_LOG_TRACE)
return FALSE
@@ -95,4 +98,4 @@
holder.IMove(get_step(holder,moving_to))
wander_delay = base_wander_delay
ai_log("handle_wander_movement() : Exited.", AI_LOG_DEBUG)
*/
*/