Преглед на файлове

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

Tomasz Zieliński преди 2 години
родител
ревизия
a5ddc225ac
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      lib/rmg/modificators/ConnectionsPlacer.cpp

+ 3 - 0
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<ObjectManager>()->updateDistances(guardPos);
 				}
 				
 				assert(zone.getModificator<RoadPlacer>());