Skip to content

Commit

Permalink
abit smarter checks for ally vehicle targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
xDanilcusx committed Jan 28, 2024
1 parent 1a3acec commit 23e9cb9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 23e9cb9

Please sign in to comment.