mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-21 12:06:49 +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);
|
std::sort(myHeroes.begin(), myHeroes.end(), scoreSort);
|
||||||
|
heroRoles.clear();
|
||||||
|
|
||||||
for(auto hero : myHeroes)
|
for(auto hero : myHeroes)
|
||||||
{
|
{
|
||||||
|
@ -134,6 +134,7 @@ void ChainActor::setBaseActor(HeroActor * base)
|
|||||||
armyCost = base->armyCost;
|
armyCost = base->armyCost;
|
||||||
actorAction = base->actorAction;
|
actorAction = base->actorAction;
|
||||||
tiCache = base->tiCache;
|
tiCache = base->tiCache;
|
||||||
|
actorExchangeCount = base->actorExchangeCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HeroActor::setupSpecialActors()
|
void HeroActor::setupSpecialActors()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user