Tomasz Zieliński 7 달 전
부모
커밋
7814d4ae8e
2개의 변경된 파일1개의 추가작업 그리고 11개의 파일을 삭제
  1. 1 10
      lib/rmg/CZonePlacer.cpp
  2. 0 1
      lib/rmg/modificators/ConnectionsPlacer.cpp

+ 1 - 10
lib/rmg/CZonePlacer.cpp

@@ -1134,10 +1134,8 @@ void CZonePlacer::dropRandomRoads(vstd::RNG * rand)
 		}
 	} while(anyDropped);
 
-	// Use a set to track processed connection IDs to avoid duplicates
-	std::set<int> processedConnectionIds;
 	
-	// Process each zone's connections
+	// Mark all remaining random connections as TRUE
 	for(auto & zonePtr : zones)
 	{
 		for(auto & connection : zonePtr.second->getConnections())
@@ -1145,13 +1143,6 @@ void CZonePlacer::dropRandomRoads(vstd::RNG * rand)
 			if(connection.getRoadOption() == rmg::ERoadOption::ROAD_RANDOM)
 			{
 				auto id = connection.getId();
-				// Only process each connection once
-				if(vstd::contains(processedConnectionIds, id))
-					continue;
-
-				processedConnectionIds.insert(id);
-				
-				// Use the new setRoadOption method
 				zonePtr.second->setRoadOption(id, rmg::ERoadOption::ROAD_TRUE);
 			}
 		}

+ 0 - 1
lib/rmg/modificators/ConnectionsPlacer.cpp

@@ -110,7 +110,6 @@ void ConnectionsPlacer::init()
 	POSTFUNCTION(RoadPlacer);
 	POSTFUNCTION(ObjectManager);
 	
-	// FIXME: Use zones modified by CZonePlacer
 	for (auto c : zone.getConnections())
 	{
 		addConnection(c);