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

Generated zones can now have different sizes depending on template.

This commit is contained in:
DjWarmonger
2016-07-13 10:35:31 +02:00
parent 1d8fb01f46
commit 7d7b51d0db
2 changed files with 3 additions and 1 deletions

View File

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