summaryrefslogtreecommitdiff
path: root/src/aircraft.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/aircraft.h')
-rw-r--r--src/aircraft.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/aircraft.h b/src/aircraft.h
index 24f4659f0..090add20d 100644
--- a/src/aircraft.h
+++ b/src/aircraft.h
@@ -96,7 +96,7 @@ struct AircraftCache {
*
* As side-effect the vehicle type is set correctly.
*/
-struct Aircraft : public Vehicle {
+struct Aircraft : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
AircraftCache acache; ///< Cache of often used calculated values
uint16 crashed_counter;
@@ -125,10 +125,10 @@ struct Aircraft : public Vehicle {
void OnNewDay();
TileIndex GetOrderStationLocation(StationID station);
bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
- Aircraft *Next() { return (Aircraft *)this->Vehicle::Next(); }
- const Aircraft *Next() const { return (const Aircraft *)this->Vehicle::Next(); }
};
+#define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var)
+
SpriteID GetRotorImage(const Aircraft *v);
Station *GetTargetAirportIfValid(const Aircraft *v);