mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-05 15:05:40 +02:00
Fix duplicated offroad connections
This commit is contained in:
parent
c8e3458dfb
commit
e5b151991b
@ -143,7 +143,7 @@ void ConnectionsPlacer::forcePortalConnection(const rmg::ZoneConnection & connec
|
||||
void ConnectionsPlacer::selfSideDirectConnection(const rmg::ZoneConnection & connection)
|
||||
{
|
||||
bool success = false;
|
||||
auto otherZoneId = (connection.getZoneA() == zone.getId() ? connection.getZoneB() : connection.getZoneA());
|
||||
auto otherZoneId = connection.getOtherZoneId(zone.getId());
|
||||
auto & otherZone = map.getZones().at(otherZoneId);
|
||||
bool createRoad = shouldGenerateRoad(connection);
|
||||
|
||||
@ -327,10 +327,9 @@ void ConnectionsPlacer::selfSideDirectConnection(const rmg::ZoneConnection & con
|
||||
|
||||
assert(otherZone->getModificator<RoadPlacer>());
|
||||
otherZone->getModificator<RoadPlacer>()->addRoadNode(roadNode);
|
||||
|
||||
}
|
||||
assert(otherZone->getModificator<ConnectionsPlacer>());
|
||||
otherZone->getModificator<ConnectionsPlacer>()->otherSideConnection(connection);
|
||||
}
|
||||
|
||||
success = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user