1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Manually adjust the position of town - noticeable on S maps.

This commit is contained in:
Tomasz Zieliński 2023-04-01 17:07:43 +02:00
parent 308b42549b
commit aca227b5e4

View File

@ -145,7 +145,7 @@ int3 TownPlacer::placeMainTown(ObjectManager & manager, CGTownInstance & town)
float distance = zone.getPos().dist2dSQ(t);
return 100000.f - distance; //some big number
}, ObjectManager::OptimizeType::WEIGHT);
rmgObject.setPosition(position);
rmgObject.setPosition(position + int3(2, 2, 0)); //place visitable tile in the exact center of a zone
manager.placeObject(rmgObject, false, true);
cleanupBoundaries(rmgObject);
zone.setPos(rmgObject.getVisitablePosition()); //roads lead to main town