From 0c5bfbeb0a58c0f77a50aa0376cfa7dc458ba770 Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Tue, 17 Apr 2018 11:01:53 -0400 Subject: [PATCH] faction check proc instead --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 206b8be893d..68b92c99580 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -188,9 +188,8 @@ if(istype(the_target, /obj/machinery/porta_turret)) var/obj/machinery/porta_turret/P = the_target - for(var/turret_faction in P.faction) - if(turret_faction in faction) - return FALSE + if(P.in_faction(src)) //Don't attack if the turret is in the same faction + return FALSE if(P.has_cover &&!P.raised) //Don't attack invincible turrets return FALSE if(P.stat & BROKEN) //Or turrets that are already broken