(svn r10999) -Codechange: unify the way the running cost of a vehicle is determined. Patch by nycom.

This commit is contained in:
rubidium
2007-08-29 21:27:16 +00:00
parent 99409d99d0
commit 3f3b013b99
10 changed files with 46 additions and 22 deletions

View File

@@ -6,7 +6,8 @@
#define ROADVEH_H
#include "vehicle.h"
#include "engine.h"
#include "variables.h"
enum RoadVehicleSubType {
RVST_FRONT,
@@ -83,6 +84,7 @@ struct RoadVehicle : public Vehicle {
int GetImage(Direction direction) const;
int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }
int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 32; }
Money GetRunningCost() const { return RoadVehInfo(this->engine_type)->running_cost * _price.roadveh_running; }
void Tick();
};