summaryrefslogtreecommitdiff
path: root/src/aircraft.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-29 21:49:08 +0000
committerrubidium <rubidium@openttd.org>2007-08-29 21:49:08 +0000
commita407d53d1b2a329a5ae747ea83d4652427cc6c8a (patch)
treeeb86df4a79dffa6270deda722c234ab9cb3c8964 /src/aircraft.h
parenta28d33b5dc89e47ae271b5dbdcc4f5e6f1784c6c (diff)
downloadopenttd-a407d53d1b2a329a5ae747ea83d4652427cc6c8a.tar.xz
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
Diffstat (limited to 'src/aircraft.h')
-rw-r--r--src/aircraft.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/aircraft.h b/src/aircraft.h
index 15a5530e0..bd274f3a9 100644
--- a/src/aircraft.h
+++ b/src/aircraft.h
@@ -33,25 +33,6 @@ static inline bool IsNormalAircraft(const Vehicle *v)
return v->subtype <= AIR_AIRCRAFT;
}
-/** Check if this aircraft is in a hangar
- * @param v vehicle to check
- * @return true if in hangar
- */
-static inline bool IsAircraftInHangar(const Vehicle *v)
-{
- assert(v->type == VEH_AIRCRAFT);
- return v->vehstatus & VS_HIDDEN && IsHangarTile(v->tile);
-}
-
-/** Check if this aircraft is in a hangar and stopped
- * @param v vehicle to check
- * @return true if in hangar and stopped
- */
-static inline bool IsAircraftInHangarStopped(const Vehicle *v)
-{
- return IsAircraftInHangar(v) && v->vehstatus & VS_STOPPED;
-}
-
/** Checks if an aircraft is buildable at the tile in question
* @param engine The engine to test
* @param tile The tile where the hangar is
@@ -133,6 +114,7 @@ struct Aircraft : public Vehicle {
int GetDisplaySpeed() const { return this->cur_speed * 10 / 16; }
int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 16; }
Money GetRunningCost() const { return AircraftVehInfo(this->engine_type)->running_cost * _price.aircraft_running; }
+ bool IsInDepot() const { return (this->vehstatus & VS_HIDDEN) != 0 && IsHangarTile(this->tile); }
void Tick();
};