From a5ddc225ac9fb274fbc122e53f1d16a9a8884ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Fri, 23 Jun 2023 21:43:49 +0200 Subject: [PATCH] Place objects away from connection even if it's empty (not guarded) --- lib/rmg/modificators/ConnectionsPlacer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rmg/modificators/ConnectionsPlacer.cpp b/lib/rmg/modificators/ConnectionsPlacer.cpp index d51e9aadb..45ec47ecf 100644 --- a/lib/rmg/modificators/ConnectionsPlacer.cpp +++ b/lib/rmg/modificators/ConnectionsPlacer.cpp @@ -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()->updateDistances(guardPos); } assert(zone.getModificator());