void AIConstruction::SetFlagsAlongRoad(const noRoadNode& roadNode, Direction dir) { // does the roadsegment still exist? const RoadSegment& roadSeg = *roadNode.GetRoute(dir); bool isBwdDir = roadSeg.GetNodeID(roadNode); MapPoint curPos = roadNode.GetPos(); // Skip first curPos = aii.gwb.GetNeighbour(curPos, roadSeg.GetDir(isBwdDir, 0)); // Start after getting first neighbor (min distance == 2) // and skip last 2 points (min distance and last is flag) for(unsigned i = 1; i + 2 < roadSeg.GetLength(); ++i) { curPos = aii.gwb.GetNeighbour(curPos, roadSeg.GetDir(isBwdDir, i)); aii.SetFlag(curPos); constructionlocations.push_back(curPos); } }