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:
commit
f6a4a1ae0c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user