diff options
author | rubidium <rubidium@openttd.org> | 2007-08-29 21:49:08 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-29 21:49:08 +0000 |
commit | c2dcccae163cf7ae604540528c08fed45dd0dbda (patch) | |
tree | eb86df4a79dffa6270deda722c234ab9cb3c8964 /src/ship.h | |
parent | 3a0e647c0eacf9619ad61e8e0c8f59a588886d27 (diff) | |
download | openttd-c2dcccae163cf7ae604540528c08fed45dd0dbda.tar.xz |
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
Diffstat (limited to 'src/ship.h')
-rw-r--r-- | src/ship.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ship.h b/src/ship.h index 929eeccc6..b08bc18f4 100644 --- a/src/ship.h +++ b/src/ship.h @@ -13,18 +13,6 @@ void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2); void RecalcShipStuff(Vehicle *v); void GetShipSpriteSize(EngineID engine, uint &width, uint &height); -static inline bool IsShipInDepot(const Vehicle *v) -{ - assert(v->type == VEH_SHIP); - return v->u.ship.state == 0x80; -} - -static inline bool IsShipInDepotStopped(const Vehicle *v) -{ - return IsShipInDepot(v) && v->vehstatus & VS_STOPPED; -} - - /** * This class 'wraps' Vehicle; you do not actually instantiate this class. * You create a Vehicle using AllocateVehicle, so it is added to the pool @@ -51,6 +39,7 @@ struct Ship: public Vehicle { int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; } int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 32; } Money GetRunningCost() const { return ShipVehInfo(this->engine_type)->running_cost * _price.ship_running; } + bool IsInDepot() const { return this->u.ship.state == 0x80; } void Tick(); }; |