diff --git a/lib/rmg/CMapGenerator.cpp b/lib/rmg/CMapGenerator.cpp index 3b3795fd8..a49e2e129 100644 --- a/lib/rmg/CMapGenerator.cpp +++ b/lib/rmg/CMapGenerator.cpp @@ -557,6 +557,7 @@ void CMapGenerator::createConnections() zoneA->placeAndGuardObject(this, gate1, tile, connection.getGuardStrength()); auto gate2 = new CGSubterraneanGate(*gate1); zoneB->placeAndGuardObject(this, gate2, otherTile, connection.getGuardStrength()); + //TODO: connect gates with middle of zone / free paths. At this point free paths do not exist yet. stop = true; //we are done, go to next connection } diff --git a/lib/rmg/CRmgTemplateZone.cpp b/lib/rmg/CRmgTemplateZone.cpp index 50d86c7b9..a593fe47a 100644 --- a/lib/rmg/CRmgTemplateZone.cpp +++ b/lib/rmg/CRmgTemplateZone.cpp @@ -1662,6 +1662,14 @@ void CRmgTemplateZone::createObstacles2(CMapGenerator* gen) } } } + //cleanup - remove unused possible tiles to make space for roads + for (auto tile : tileinfo) + { + if (gen->isPossible(tile)) + { + gen->setOccupied (tile, ETileType::FREE); + } + } } void CRmgTemplateZone::connectRoads(CMapGenerator* gen)