1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Nullkiller: replace a hack with temporary bonus node concept

This commit is contained in:
Andrii Danylchenko
2021-03-01 21:38:50 +02:00
committed by Andrii Danylchenko
parent 3fa7e0976f
commit 70ed3f55a5
8 changed files with 50 additions and 30 deletions

View File

@@ -115,9 +115,7 @@ void AINodeStorage::initialize(const PathfinderOptions & options, const CGameSta
void AINodeStorage::clear()
{
CCreature::DisableChildLinkage = true;
actors.clear();
CCreature::DisableChildLinkage = false;
heroChainPass = EHeroChainPass::INITIAL;
heroChainTurn = 0;
heroChainMaxTurns = 1;
@@ -499,8 +497,6 @@ bool AINodeStorage::calculateHeroChain()
std::vector<int3> data(commitedTiles.begin(), commitedTiles.end());
CCreature::DisableChildLinkage = true;
if(data.size() > 100)
{
boost::mutex resultMutex;
@@ -530,8 +526,6 @@ bool AINodeStorage::calculateHeroChain()
task.flushResult(heroChain);
}
CCreature::DisableChildLinkage = false;
commitedTiles.clear();
return !heroChain.empty();