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

Bugfixing. Game seems to be working without major bugs.

This commit is contained in:
Ivan Savenko
2014-06-15 23:25:10 +03:00
parent 836c466f81
commit 89b89ff85d
7 changed files with 70 additions and 52 deletions

View File

@@ -773,26 +773,6 @@ void CTownHandler::loadObject(std::string scope, std::string name, const JsonNod
void CTownHandler::afterLoadFinalization()
{
initializeRequirements();
for (CFaction * fact : factions)
{
// MODS COMPATIBILITY FOR 0.96
if (fact->town)
{
assert(fact->town->dwellings.size() == fact->town->dwellingNames.size());
for (size_t i=0; i<fact->town->dwellings.size(); i++)
{
//both unupgraded and upgraded get same dwelling
for (auto cre : fact->town->creatures[i])
{
JsonNode templ;
templ["animation"].String() = fact->town->dwellings[i];
VLC->objtypeh->loadSubObject("", JsonNode(), Obj::CREATURE_GENERATOR1, 100 + cre);
VLC->objtypeh->getHandlerFor(Obj::CREATURE_GENERATOR1, 100 + cre)->addTemplate(templ);
}
}
}
}
}
void CTownHandler::initializeRequirements()