1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Stabilization

This commit is contained in:
Ivan Savenko
2023-11-01 16:10:33 +02:00
parent 8346d71c98
commit b42f073f0c
6 changed files with 19 additions and 25 deletions

View File

@@ -526,15 +526,6 @@ void CGameState::randomizeMapObjects()
object->pickRandomObject(getRandomGenerator());
auto * hero = dynamic_cast<CGHeroInstance *>(object);
auto * town = dynamic_cast<CGTownInstance *>(object);
if (hero && hero->ID != Obj::PRISON)
map->heroesOnMap.emplace_back(hero);
if (town)
map->towns.emplace_back(town);
//handle Favouring Winds - mark tiles under it
if(object->ID == Obj::FAVORABLE_WINDS)
{
@@ -1825,10 +1816,10 @@ void CGameState::buildBonusSystemTree()
buildGlobalTeamPlayerTree();
attachArmedObjects();
// for(CGTownInstance *t : map->towns)
// {
// t->deserializationFix();
// }
for(CGTownInstance *t : map->towns)
{
t->deserializationFix();
}
// CStackInstance <-> CCreature, CStackInstance <-> CArmedInstance, CArtifactInstance <-> CArtifact
// are provided on initializing / deserializing