diff --git a/lib/rmg/ConnectionsPlacer.cpp b/lib/rmg/ConnectionsPlacer.cpp index 20ce47f14..734d86562 100644 --- a/lib/rmg/ConnectionsPlacer.cpp +++ b/lib/rmg/ConnectionsPlacer.cpp @@ -243,7 +243,7 @@ void ConnectionsPlacer::selfSideIndirectConnection(const rmg::ZoneConnection & c path2 = managerOther.placeAndConnectObject(toPlace, rmgGate2, minDist, guarded2, true, ObjectManager::OptimizeType::NONE); - return path2.valid() ? (dist + otherDist) : -1.f; + return path2.valid() ? (dist * otherDist) : -1.f; }, guarded1, true, ObjectManager::OptimizeType::DISTANCE); if(path1.valid() && path2.valid()) diff --git a/lib/rmg/MinePlacer.cpp b/lib/rmg/MinePlacer.cpp index dfe61522a..79a00e3d5 100644 --- a/lib/rmg/MinePlacer.cpp +++ b/lib/rmg/MinePlacer.cpp @@ -7,6 +7,7 @@ #include "StdInc.h" #include "MinePlacer.h" #include "TownPlacer.h" +#include "ConnectionsPlacer.h" #include "CMapGenerator.h" #include "RmgMap.h" #include "../mapping/CMap.h" @@ -38,6 +39,7 @@ void MinePlacer::process() void MinePlacer::init() { DEPENDENCY(TownPlacer); + DEPENDENCY(ConnectionsPlacer); POSTFUNCTION(ObjectManager); POSTFUNCTION(RoadPlacer); }