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

Method drawFlights

src/Geoscape/Globe.cpp:1658–1688  ·  view source on GitHub ↗

* Draws the flight paths of player craft flying on the globe. */

Source from the content-addressed store, hash-verified

1656 * Draws the flight paths of player craft flying on the globe.
1657 */
1658void Globe::drawFlights()
1659{
1660 //_radars->clear();
1661
1662 if (!Options::globeFlightPaths)
1663 return;
1664
1665 // Lock the surface
1666 _radars->lock();
1667
1668 // Draw the craft flight paths
1669 for (std::vector<Base*>::iterator i = _game->getSavedGame()->getBases()->begin(); i != _game->getSavedGame()->getBases()->end(); ++i)
1670 {
1671 for (std::vector<Craft*>::iterator j = (*i)->getCrafts()->begin(); j != (*i)->getCrafts()->end(); ++j)
1672 {
1673 // Hide crafts docked at base
1674 if ((*j)->getStatus() != "STR_OUT" || (*j)->getDestination() == 0 /*|| pointBack((*j)->getLongitude(), (*j)->getLatitude())*/)
1675 continue;
1676
1677 double lon1 = (*j)->getLongitude();
1678 double lon2 = (*j)->getDestination()->getLongitude();
1679 double lat1 = (*j)->getLatitude();
1680 double lat2 = (*j)->getDestination()->getLatitude();
1681
1682 drawPath(_radars, lon1, lat1, lon2, lat2);
1683 }
1684 }
1685
1686 // Unlock the surface
1687 _radars->unlock();
1688}
1689
1690/**
1691 * Draws the markers of all the various things going

Callers

nothing calls this directly

Calls 9

getBasesMethod · 0.80
getSavedGameMethod · 0.80
getDestinationMethod · 0.80
unlockMethod · 0.80
lockMethod · 0.45
getCraftsMethod · 0.45
getStatusMethod · 0.45
getLongitudeMethod · 0.45
getLatitudeMethod · 0.45

Tested by

no test coverage detected