diff --git a/ChangeLog b/ChangeLog index 1d569573a..e1add4cc8 100644 --- a/ChangeLog +++ b/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 diff --git a/lib/rmg/CZonePlacer.cpp b/lib/rmg/CZonePlacer.cpp index 6cc7f00db..a9b3ebd2c 100644 --- a/lib/rmg/CZonePlacer.cpp +++ b/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