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
commit91d18ebd17ef4f71e0663ee7affcb7ab6e4747f6 (patch)
tree774788b69d486a12f8c1135fa3ca8e087d508d2a /src/ship.h
parent39f17c9de45b8449961d0165e922186ed8b7c2ef (diff)
downloadopenttd-91d18ebd17ef4f71e0663ee7affcb7ab6e4747f6.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();
};