From 23e9cb95aba8cd7289336a9964a0834cd35eac63 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 29 Jan 2024 00:09:50 +0300 Subject: [PATCH] abit smarter checks for ally vehicle targeting --- .../mob/living/carbon/xenomorph/ai/xeno_ai.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm index 6be7385b73..7d143440bc 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm @@ -282,19 +282,22 @@ if(distance > ai_range) continue - var/skip_vehicle + if(potential_vehicle_target.health <= 0) + continue + + var/multitile_faction = potential_vehicle_target.vehicle_faction + if(hive.faction_is_ally(multitile_faction)) + continue + var/skip_vehicle var/list/interior_living_mobs = potential_vehicle_target.interior.get_passengers() for(var/mob/living/carbon/human/human_mob in interior_living_mobs) - if(human_mob.stat == DEAD || human_mob.check_mob_target(src)) + if(!human_mob.check_mob_target(src)) continue - skip_vehicle = TRUE + skip_vehicle = FALSE break - if(potential_vehicle_target.health <= 0) - skip_vehicle = TRUE - if(skip_vehicle) continue