From e0d8c79bc65ba58a426c3eb9bdf47ada437f9813 Mon Sep 17 00:00:00 2001 From: Superlagg Date: Mon, 25 Mar 2024 13:26:46 -0700 Subject: [PATCH 1/2] lol i didnt test is, uwu!~ --- .../mob/living/simple_animal/hostile/hostile.dm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b82d611144..f94f9da1cb 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(!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 From 5cff9dd9b551858a29f9208b21c199a6e8245cea Mon Sep 17 00:00:00 2001 From: Superlagg Date: Mon, 25 Mar 2024 15:05:28 -0700 Subject: [PATCH 2/2] Update hostile.dm --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index f94f9da1cb..94551e5f3a 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -414,7 +414,7 @@ if(M.status_flags & GODMODE) return FALSE if(!M.client) - if(!debug_disable_mob_ceasefire) + if(!SSmobs.debug_disable_mob_ceasefire) var/client_in_range = FALSE for(var/client/C in GLOB.clients) if(!C.mob)