MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / findPathThrough

Method findPathThrough

game/state/tilemap/pathfinding.cpp:1521–1538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1519}
1520
1521std::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
1540void City::groupMove(GameState &state, std::list<StateRef<Vehicle>> &selectedVehicles,
1541 Vec3<int> targetLocation, bool useTeleporter)

Callers 1

findShortestPathMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected