MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetRange

Method GetRange

src/engine.cpp:452–460  ·  view source on GitHub ↗

* Get the range of an aircraft type. * @return Range of the aircraft type in tiles or 0 if unlimited range. */

Source from the content-addressed store, hash-verified

450 * @return Range of the aircraft type in tiles or 0 if unlimited range.
451 */
452uint16_t Engine::GetRange() const
453{
454 switch (this->type) {
455 case VEH_AIRCRAFT:
456 return GetEngineProperty(this->index, PROP_AIRCRAFT_RANGE, this->VehInfo<AircraftVehicleInfo>().max_range);
457
458 default: NOT_REACHED();
459 }
460}
461
462/**
463 * Get the name of the aircraft type for display purposes.

Callers 9

DrawSettingMethod · 0.45
DrawOrderStringFunction · 0.45
DrawSettingMethod · 0.45
OptionsPanelClickMethod · 0.45
AircraftRangeSorterFunction · 0.45
DrawAircraftPurchaseInfoFunction · 0.45
DrawWidgetMethod · 0.45

Calls 2

GetEnginePropertyFunction · 0.85
NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected