1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Attempt to make constant bonus system nodes (CCreature / CArtifact)

fully constant
This commit is contained in:
Ivan Savenko
2024-01-01 12:49:17 +02:00
parent 2c4cad7d9c
commit c37ce05d06
5 changed files with 83 additions and 47 deletions

View File

@@ -72,7 +72,7 @@ void CStack::localInit(BattleInfo * battleInfo)
CArmedInstance * army = battle->battleGetArmyObject(side);
assert(army);
attachTo(*army);
attachTo(const_cast<CCreature&>(*type));
attachToSource(*type);
}
nativeTerrain = getNativeTerrain(); //save nativeTerrain in the variable on the battle start to avoid dead lock
CUnitState::localInit(this); //it causes execution of the CStack::isOnNativeTerrain where nativeTerrain will be considered