From 18e3a3ddfc7c9eee4d1023485a4c23b3cc40fbb3 Mon Sep 17 00:00:00 2001 From: terkhen Date: Sat, 6 Nov 2010 13:05:11 +0000 Subject: (svn r21099) -Codechange: Store road vehicle max speed in the vehicle cache. --- src/roadveh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/roadveh.h') diff --git a/src/roadveh.h b/src/roadveh.h index a8fcccd00..96a86bafa 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -119,7 +119,7 @@ struct RoadVehicle : public GroundVehicle { bool IsPrimaryVehicle() const { return this->IsRoadVehFront(); } SpriteID GetImage(Direction direction) const; int GetDisplaySpeed() const { return this->cur_speed / 2; } - int GetDisplayMaxSpeed() const { return this->max_speed / 2; } + int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed / 2; } Money GetRunningCost() const; int GetDisplayImageWidth(Point *offset = NULL) const; bool IsInDepot() const { return this->state == RVSB_IN_DEPOT; } -- cgit v1.2.3-54-g00ecf