1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

BattleAI: fix freeze

This commit is contained in:
Andrii Danylchenko 2023-08-27 20:44:03 +03:00
parent 2fef0e8d40
commit 4b807e01f1

View File

@ -30,7 +30,7 @@ void DamageCache::buildDamageCache(std::shared_ptr<HypotheticBattle> hb, int sid
{ {
auto stacks = hb->battleGetUnitsIf([=](const battle::Unit * u) -> bool auto stacks = hb->battleGetUnitsIf([=](const battle::Unit * u) -> bool
{ {
return true; return u->isValidTarget();
}); });
std::vector<const battle::Unit *> ourUnits, enemyUnits; std::vector<const battle::Unit *> ourUnits, enemyUnits;