(svn r21912) -Codechange: let road vehicles use gcache.last_speed/SetLastSpeed as well

This commit is contained in:
rubidium
2011-01-26 17:31:44 +00:00
parent 0f411f9899
commit aa1f02c248
3 changed files with 4 additions and 9 deletions

View File

@@ -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;