(svn r21099) -Codechange: Store road vehicle max speed in the vehicle cache.

This commit is contained in:
terkhen
2010-11-06 13:05:11 +00:00
parent 25d1b2f54b
commit 18e3a3ddfc
5 changed files with 20 additions and 21 deletions

View File

@@ -119,7 +119,7 @@ struct RoadVehicle : public GroundVehicle<RoadVehicle, VEH_ROAD> {
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; }