* Select a destination based on the criteria of our trajectory and desired waypoint. * @param trajectory the trajectory in question. * @param nextWaypoint the next logical waypoint in sequence (0 for newly spawned UFOs) * @param globe The earth globe, required to get access to land checks. * @param region the ruleset for the region of our mission. * @return a set of lon and lat coordinates ba
| 681 | * @return a set of lon and lat coordinates based on the criteria of the trajectory. |
| 682 | */ |
| 683 | std::pair<double, double> AlienMission::getWaypoint(const UfoTrajectory &trajectory, const size_t nextWaypoint, const Globe &globe, const RuleRegion ®ion) |
| 684 | { |
| 685 | /* LOOK MA! NO HANDS! |
| 686 | if (trajectory.getAltitude(nextWaypoint) == "STR_GROUND") |
| 687 | { |
| 688 | return getLandPoint(globe, region, trajectory.getZone(nextWaypoint)); |
| 689 | } |
| 690 | else |
| 691 | */ |
| 692 | return region.getRandomPoint(trajectory.getZone(nextWaypoint)); |
| 693 | } |
| 694 | |
| 695 | /** |
| 696 | * Get a random point inside the given region zone. |
nothing calls this directly
no test coverage detected