diff options
author | rubidium <rubidium@openttd.org> | 2007-08-28 06:46:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-28 06:46:33 +0000 |
commit | 5e5d36d6b4c0d86abc9f8c346bda5254b7f8ba35 (patch) | |
tree | cc70dd0831f84779834db7751c18a5a7eb87e5b1 /src/train.h | |
parent | cb3843b8205c4fb7b04e95fa4b32cf036c7d89df (diff) | |
download | openttd-5e5d36d6b4c0d86abc9f8c346bda5254b7f8ba35.tar.xz |
(svn r10995) -Codechange: unify the way to get the displayed maxium speed of a vehicle. Patch by nycom.
Diffstat (limited to 'src/train.h')
-rw-r--r-- | src/train.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/train.h b/src/train.h index db9aa5b2d..a64048fb8 100644 --- a/src/train.h +++ b/src/train.h @@ -273,6 +273,7 @@ struct Train : public Vehicle { bool HasFront() const { return true; } int GetImage(Direction direction) const; int GetDisplaySpeed() const { return this->cur_speed * 10 / 16; } + int GetDisplayMaxSpeed() const { return this->u.rail.cached_max_speed * 10 / 16; } void Tick(); }; |