mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Sleep AI processing when nobody on their Zlevel
This commit is contained in:
@@ -318,9 +318,11 @@
|
||||
if(STANCE_MOVE)
|
||||
if(hostile && find_target()) // This will switch its stance.
|
||||
ai_log("handle_stance_strategical() : STANCE_MOVE, found target and was inturrupted.", AI_LOG_TRACE)
|
||||
return
|
||||
if(STANCE_FOLLOW)
|
||||
if(hostile && find_target()) // This will switch its stance.
|
||||
ai_log("handle_stance_strategical() : STANCE_FOLLOW, found target and was inturrupted.", AI_LOG_TRACE)
|
||||
return
|
||||
else if(leader)
|
||||
ai_log("handle_stance_strategical() : STANCE_FOLLOW, going to calculate_path([leader]).", AI_LOG_TRACE)
|
||||
calculate_path(leader)
|
||||
@@ -359,5 +361,6 @@
|
||||
if(ai_holder)
|
||||
ai_holder.receive_taunt(taunter, force_target_switch)
|
||||
|
||||
#undef AI_NO_PROCESS
|
||||
#undef AI_PROCESSING
|
||||
#undef AI_FASTPROCESSING
|
||||
@@ -6,7 +6,7 @@
|
||||
// If our holder is able to do anything.
|
||||
/datum/ai_holder/proc/can_act()
|
||||
if(!holder) // Holder missing.
|
||||
manage_processing(AI_NO_PROCESS)
|
||||
manage_processing(0)
|
||||
return FALSE
|
||||
if(holder.stat) // Dead or unconscious.
|
||||
ai_log("can_act() : Stat was non-zero ([holder.stat]).", AI_LOG_TRACE)
|
||||
|
||||
Reference in New Issue
Block a user