1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +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

View File

@ -20,6 +20,7 @@ RANDOM MAP GENERATOR:
* Zones will not have straight paths anymore, they are totally random
* Added Thieves Guild random object (1 per zone)
* Added Seer Huts with quests that match OH3
* RMG will guarantee at least 100 pairs of Monoliths are available even if there are not enough different defs
0.97 -> 0.98
GENERAL:

View File

@ -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