summaryrefslogtreecommitdiff
path: root/src/roadveh.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-26 17:31:44 +0000
committerrubidium <rubidium@openttd.org>2011-01-26 17:31:44 +0000
commit4fff63d790ab865cc93963d1939f27ee1c023ace (patch)
tree04fd8c3aeb35983dea8084dad2f14bcf91d4e305 /src/roadveh.h
parentb11f1bd4ed68fc0d031429df2925b87ed6baceb3 (diff)
downloadopenttd-4fff63d790ab865cc93963d1939f27ee1c023ace.tar.xz
(svn r21912) -Codechange: let road vehicles use gcache.last_speed/SetLastSpeed as well
Diffstat (limited to 'src/roadveh.h')
-rw-r--r--src/roadveh.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh.h b/src/roadveh.h
index adec81bba..3cfecd609 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -104,7 +104,7 @@ struct RoadVehicle : public GroundVehicle<RoadVehicle, VEH_ROAD> {
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_ROADVEH_INC : EXPENSES_ROADVEH_RUN; }
bool IsPrimaryVehicle() const { return this->IsFrontEngine(); }
SpriteID GetImage(Direction direction) const;
- int GetDisplaySpeed() const { return this->cur_speed / 2; }
+ int GetDisplaySpeed() const { return this->gcache.last_speed / 2; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed / 2; }
Money GetRunningCost() const;
int GetDisplayImageWidth(Point *offset = NULL) const;