mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Clear unused tiles to make more space for roads.
This commit is contained in:
parent
48efa2450a
commit
55c1a7eade
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user