1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +02:00

RMG will now multiply Monolith defs to ensure there are at least 100 pairs avaiable for connections.

This commit is contained in:
DjWarmonger
2016-01-09 09:03:40 +01:00
parent dd1fc47c93
commit 676f078b2e
2 changed files with 11 additions and 0 deletions

@ -299,6 +299,16 @@ void CObjectClassesHandler::afterLoadFinalization()
logGlobal->warnStream() << "No templates found for " << entry.first << ":" << obj.first;
}
}
//duplicate existing two-way portals to make reserve for RMG
auto& portalVec = objects[Obj::MONOLITH_TWO_WAY]->objects;
size_t portalCount = portalVec.size();
size_t currentIndex = portalCount;
while (portalVec.size() < 100)
{
portalVec[currentIndex] = portalVec[currentIndex % portalCount];
currentIndex++;
}
}
std::string CObjectClassesHandler::getObjectName(si32 type) const