From c5a7f67cd6659bf9c3586bf5afedfe325b9684ed Mon Sep 17 00:00:00 2001 From: Morrow Date: Fri, 3 Nov 2023 07:58:27 -0400 Subject: [PATCH] lurkers should stop harassing people they shouldn't --- .../mob/living/carbon/xenomorph/ai/movement/lurking.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm index 15c4fb257b..e9413bc4a4 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm @@ -247,7 +247,7 @@ registered_turfs += cycled_open_turf var/mob/living/carbon/human/possible_target = locate() in cycled_open_turf - if(possible_target && (!parent.current_target || get_dist(parent, possible_target) < get_dist(parent, parent.current_target))) + if(possible_target && (!parent.current_target || get_dist(parent, possible_target) < get_dist(parent, parent.current_target)) && parent.check_mob_target(possible_target)) parent.current_target = possible_target /datum/xeno_ai_movement/linger/lurking/proc/unregister_turf_signals() @@ -261,8 +261,9 @@ if(!istype(entering_atom, /mob/living/carbon/human)) return - if(!parent.current_target || get_dist(parent, entering_atom) < get_dist(parent, parent.current_target)) - parent.current_target = entering_atom + var/mob/living/carbon/human/possible_target = entering_atom + if(!parent.current_target || get_dist(parent, possible_target) < get_dist(parent, parent.current_target) && parent.check_mob_target(possible_target)) + parent.current_target = possible_target /datum/xeno_ai_movement/linger/lurking/proc/lurking_parent_moved(atom/movable/moving_atom, atom/oldloc, direction, Forced) SIGNAL_HANDLER