Ver código fonte

Generated zones can now have different sizes depending on template.

DjWarmonger 9 anos atrás
pai
commit
7d7b51d0db
2 arquivos alterados com 3 adições e 1 exclusões
  1. 1 0
      ChangeLog
  2. 2 1
      lib/rmg/CZonePlacer.cpp

+ 1 - 0
ChangeLog

@@ -26,6 +26,7 @@ ADVETURE AI:
 RANDOM MAP GENERATOR:
 * Changed fractalization algorithm so it can create cycles
 * Zones will not have straight paths anymore, they are totally random
+* Generated zones will have different size depending on template setting
 * 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

+ 2 - 1
lib/rmg/CZonePlacer.cpp

@@ -436,7 +436,8 @@ void CZonePlacer::assignZones(const CMapGenOptions * mapGenOptions)
 
 	auto compareByDistance = [](const Dpair & lhs, const Dpair & rhs) -> bool
 	{
-		return lhs.second < rhs.second;
+		//bigger zones have smaller distance
+		return lhs.second / lhs.first->getSize() < rhs.second / rhs.first->getSize();
 	};
 
 	auto moveZoneToCenterOfMass = [](CRmgTemplateZone * zone) -> void