mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
NKA: fix accessing removed hero and heroExchangeCount
This commit is contained in:
parent
db2be3ee05
commit
5083100d3b
@ -125,6 +125,7 @@ void HeroManager::update()
|
||||
}
|
||||
|
||||
std::sort(myHeroes.begin(), myHeroes.end(), scoreSort);
|
||||
heroRoles.clear();
|
||||
|
||||
for(auto hero : myHeroes)
|
||||
{
|
||||
|
@ -134,6 +134,7 @@ void ChainActor::setBaseActor(HeroActor * base)
|
||||
armyCost = base->armyCost;
|
||||
actorAction = base->actorAction;
|
||||
tiCache = base->tiCache;
|
||||
actorExchangeCount = base->actorExchangeCount;
|
||||
}
|
||||
|
||||
void HeroActor::setupSpecialActors()
|
||||
|
Loading…
Reference in New Issue
Block a user