1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Place objects away from connection even if it's empty (not guarded)

This commit is contained in:
Tomasz Zieliński 2023-06-23 21:43:49 +02:00
parent 64e8b9b2b9
commit a5ddc225ac

View File

@ -245,9 +245,12 @@ void ConnectionsPlacer::selfSideDirectConnection(const rmg::ZoneConnection & con
}
else
{
//Update distances from empty passage, too
zone.areaPossible().erase(guardPos);
zone.freePaths().add(guardPos);
map.setOccupied(guardPos, ETileType::FREE);
manager.updateDistances(guardPos);
otherZone->getModificator<ObjectManager>()->updateDistances(guardPos);
}
assert(zone.getModificator<RoadPlacer>());