# Aircraft Struct Reference

Aircraft, helicopters, rotors and their shadows belong to this class. More...

`#include <aircraft.h>`

Inheritance diagram for Aircraft:

## Public Member Functions
| Aircraft ()
| We don't want GCC to zero our struct! It already is zeroed and has an index!
virtual | ~Aircraft ()
| We want to 'destruct' the right class.
const char * | GetTypeString () const
void | MarkDirty ()
void | UpdateDeltaXY (Direction direction)
ExpensesType | GetExpenseType (bool income) const
bool | IsPrimaryVehicle () const
SpriteID | GetImage (Direction direction) const
int | GetDisplaySpeed () const
int | GetDisplayMaxSpeed () const
Money | GetRunningCost () const
bool | IsInDepot () const
bool | Tick ()
void | OnNewDay ()
uint | Crash (bool flooded=false)
TileIndex | GetOrderStationLocation (StationID station)
bool | FindClosestDepot (TileIndex *location, DestinationID *destination, bool *reverse)
FORCEINLINE bool | IsNormalAircraft () const
| Check if the aircraft type is a normal flying device; eg not a rotor or a shadow.
## Data Fields
AircraftCache | acache
| Cache of often used calculated values.
uint16 | crashed_counter
byte | pos
byte | previous_pos
StationID | targetairport
byte | state
DirectionByte | last_direction
byte | number_consecutive_turns
byte | turn_counter
| Ticks between each turn to prevent > 45 degree turns.

## Detailed Description

Aircraft, helicopters, rotors and their shadows belong to this class.

Definition at line 66 of file aircraft.h.

## Constructor & Destructor Documentation

virtual Aircraft::~Aircraft | ( |  | ) | `[inline, virtual]`

We want to 'destruct' the right class.

Definition at line 83 of file aircraft.h.

## Member Function Documentation

FORCEINLINE bool Aircraft::IsNormalAircraft | ( |  | ) | const`[inline]`

Check if the aircraft type is a normal flying device; eg not a rotor or a shadow.

Returns:
  Returns true if the aircraft is a helicopter/airplane and false if it is a shadow or a rotor

Definition at line 107 of file aircraft.h.

References AIR_AIRCRAFT.

Referenced by LoadUnloadVehicle(), RemoveAirport(), UpdateAirplanesOnNewStation(), UpdateOldAircraft(), and Station::~Station().

## Field Documentation

byte Aircraft::turn_counter

Ticks between each turn to prevent > 45 degree turns.

Definition at line 78 of file aircraft.h.

Referenced by AircraftController().

The documentation for this struct was generated from the following files:

- src/aircraft.h
- src/aircraft_cmd.cpp