From 259fcedc855bc0177bebb7f73931294944c25967 Mon Sep 17 00:00:00 2001 From: MichalZr6 Date: Thu, 3 Oct 2024 23:03:36 +0200 Subject: [PATCH] Fix flying units move into damaging obstacles --- AI/BattleAI/BattleEvaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/BattleAI/BattleEvaluator.cpp b/AI/BattleAI/BattleEvaluator.cpp index 57014836e..655d07a82 100644 --- a/AI/BattleAI/BattleEvaluator.cpp +++ b/AI/BattleAI/BattleEvaluator.cpp @@ -394,7 +394,7 @@ BattleAction BattleEvaluator::goTowardsNearest(const CStack * stack, std::vector { std::set obstacleHexes; - auto insertAffected = [](const CObstacleInstance & spellObst, std::set obstacleHexes) { + auto insertAffected = [](const CObstacleInstance & spellObst, std::set & obstacleHexes) { auto affectedHexes = spellObst.getAffectedTiles(); obstacleHexes.insert(affectedHexes.cbegin(), affectedHexes.cend()); };