mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	RMG will now multiply Monolith defs to ensure there are at least 100 pairs avaiable for connections.
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user