* Draws the flight paths of player craft flying on the globe. */
| 1656 | * Draws the flight paths of player craft flying on the globe. |
| 1657 | */ |
| 1658 | void 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 |
nothing calls this directly
no test coverage detected