1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #2686 from vcmi/fix-battle-freeze

BattleAI: fix freeze
This commit is contained in:
Ivan Savenko 2023-08-31 01:06:47 +03:00 committed by GitHub
commit f6a4a1ae0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
{
return true;
return u->isValidTarget();
});
std::vector<const battle::Unit *> ourUnits, enemyUnits;