| 1519 | } |
| 1520 | |
| 1521 | std::list<Vec3<int>> RoadSegment::findPathThrough(int id) const |
| 1522 | { |
| 1523 | // Expecting to be intact as we have checked before |
| 1524 | // Path through intersection is just that point |
| 1525 | if (length == 1) |
| 1526 | { |
| 1527 | return {tilePosition[0]}; |
| 1528 | } |
| 1529 | // Path through road |
| 1530 | if (id == 0) |
| 1531 | { |
| 1532 | return findPath(getFirst(), getLast()); |
| 1533 | } |
| 1534 | else |
| 1535 | { |
| 1536 | return findPath(getLast(), getFirst()); |
| 1537 | } |
| 1538 | } |
| 1539 | |
| 1540 | void City::groupMove(GameState &state, std::list<StateRef<Vehicle>> &selectedVehicles, |
| 1541 | Vec3<int> targetLocation, bool useTeleporter) |