MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getWaypoint

Method getWaypoint

src/Savegame/AlienMission.cpp:683–693  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

681 * @return a set of lon and lat coordinates based on the criteria of the trajectory.
682 */
683std::pair<double, double> AlienMission::getWaypoint(const UfoTrajectory &trajectory, const size_t nextWaypoint, const Globe &globe, const RuleRegion &region)
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.

Callers

nothing calls this directly

Calls 2

getRandomPointMethod · 0.80
getZoneMethod · 0.80

Tested by

no test coverage detected