summaryrefslogtreecommitdiff
path: root/src/ship.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-26 20:43:22 +0000
committerrubidium <rubidium@openttd.org>2007-08-26 20:43:22 +0000
commita5b32d8d7238ae769a9dc3bcc71aaaba213058b9 (patch)
tree774788b69d486a12f8c1135fa3ca8e087d508d2a /src/ship.h
parenta83ccad6bd289715da504f9ab514ac781ece5608 (diff)
downloadopenttd-a5b32d8d7238ae769a9dc3bcc71aaaba213058b9.tar.xz
(svn r10984) -Codechange: unify the way one can get the current speed in the same forwat so we can display it.
Diffstat (limited to 'src/ship.h')
-rw-r--r--src/ship.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ship.h b/src/ship.h
index 304872758..d60a4521d 100644
--- a/src/ship.h
+++ b/src/ship.h
@@ -47,6 +47,7 @@ struct Ship: public Vehicle {
void PlayLeaveStationSound() const;
bool IsPrimaryVehicle() const { return true; }
int GetImage(Direction direction) const;
+ int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }
void Tick();
};