summaryrefslogtreecommitdiff
path: root/src/ship.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-22 18:17:20 +0000
committerrubidium <rubidium@openttd.org>2009-05-22 18:17:20 +0000
commit441011b782294e93b47876f24de96a63da7dd678 (patch)
tree7592579bbde1a91f353a6d685a8a64128f6a6955 /src/ship.h
parentcf0cfb908f02ca54efd5956f11909514de062015 (diff)
downloadopenttd-441011b782294e93b47876f24de96a63da7dd678.tar.xz
(svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle.
Diffstat (limited to 'src/ship.h')
-rw-r--r--src/ship.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ship.h b/src/ship.h
index 95df31e54..f6306a8d4 100644
--- a/src/ship.h
+++ b/src/ship.h
@@ -23,6 +23,8 @@ void GetShipSpriteSize(EngineID engine, uint &width, uint &height);
* As side-effect the vehicle type is set correctly.
*/
struct Ship: public Vehicle {
+ TrackBitsByte state;
+
/** Initializes the Vehicle to a ship */
Ship() { this->type = VEH_SHIP; }
@@ -39,9 +41,10 @@ struct Ship: public Vehicle {
int GetDisplaySpeed() const { return this->cur_speed / 2; }
int GetDisplayMaxSpeed() const { return this->max_speed / 2; }
Money GetRunningCost() const;
- bool IsInDepot() const { return this->u.ship.state == TRACK_BIT_DEPOT; }
+ bool IsInDepot() const { return this->state == TRACK_BIT_DEPOT; }
bool Tick();
void OnNewDay();
+ Trackdir GetVehicleTrackdir() const;
TileIndex GetOrderStationLocation(StationID station);
bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
};