1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fix few more warnings on game start

This commit is contained in:
Ivan Savenko
2023-11-26 18:56:48 +02:00
parent 68de34e508
commit e00d871082
2 changed files with 13 additions and 19 deletions

View File

@ -784,7 +784,7 @@ void CGameState::initTowns()
CGTownInstance * vti =(elem);
assert(vti->town);
if(vti->getNameTranslated().empty())
if(vti->getNameTextID().empty())
{
size_t nameID = getRandomGenerator().nextInt(vti->getTown()->getRandomNamesCount() - 1);
vti->setNameTextId(vti->getTown()->getRandomNameTextID(nameID));
@ -1797,12 +1797,6 @@ void CGameState::buildBonusSystemTree()
{
t->deserializationFix();
}
// CStackInstance <-> CCreature, CStackInstance <-> CArmedInstance, CArtifactInstance <-> CArtifact
// are provided on initializing / deserializing
// NOTE: calling deserializationFix() might be more correct option, but might lead to side effects
for (auto hero : map->heroesOnMap)
hero->boatDeserializationFix();
}
void CGameState::deserializationFix()