diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b82d611144..94551e5f3a 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -414,13 +414,16 @@ if(M.status_flags & GODMODE) return FALSE if(!M.client) - var/client_in_range = FALSE - for(var/client/C in GLOB.clients) - if(get_dist(M, C) < SSmobs.distance_where_a_player_needs_to_be_in_for_npcs_to_fight_other_npcs) - client_in_range = TRUE - break - if(!client_in_range) - return FALSE + if(!SSmobs.debug_disable_mob_ceasefire) + var/client_in_range = FALSE + for(var/client/C in GLOB.clients) + if(!C.mob) + continue + if(get_dist(M, C.mob) < SSmobs.distance_where_a_player_needs_to_be_in_for_npcs_to_fight_other_npcs) + client_in_range = TRUE + break + if(!client_in_range) + return FALSE if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it return FALSE