1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #1946 from vcmi/mines_after_monoliths

Monoliths and Subterranean Gates placement tweaks
This commit is contained in:
DjWarmonger
2023-04-14 08:15:09 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

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

View File

@@ -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);
}