Skip to content

Commit

Permalink
[MIRROR] stop ai from endlessly attacking doors (#2702)
Browse files Browse the repository at this point in the history
Co-authored-by: MuckerMayhem <[email protected]>
Co-authored-by: AmShegars <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent b11691f commit 44a3f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/ai/ai_holder_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

give_up_movement()

if ((!old_target || !can_see_target(old_target)) && target_last_seen_turf && intelligence_level >= AI_NORMAL)
if ((!old_target || !can_see_target(old_target)) && target_last_seen_turf && (lose_target_timeout > (lose_target_time - world.time)) && intelligence_level >= AI_NORMAL)
ai_log("lose_target() : Going into 'engage unseen enemy' mode.", AI_LOG_INFO)
engage_unseen_enemy()
return TRUE //We're still working on it
Expand Down

0 comments on commit 44a3f9a

Please sign in to comment.