diff options
author | rubidium <rubidium@openttd.org> | 2007-08-29 21:27:16 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-29 21:27:16 +0000 |
commit | 3f3b013b99ac0378ed94098ca19e864d208880c7 (patch) | |
tree | c750fba2dc3e7efcc74cbccf329c29e874b3102e /src/roadveh.h | |
parent | 99409d99d0cffdbd82aaa5f3a6f5da2c96623678 (diff) | |
download | openttd-3f3b013b99ac0378ed94098ca19e864d208880c7.tar.xz |
(svn r10999) -Codechange: unify the way the running cost of a vehicle is determined. Patch by nycom.
Diffstat (limited to 'src/roadveh.h')
-rw-r--r-- | src/roadveh.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/roadveh.h b/src/roadveh.h index 24b64424d..7644e3570 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -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(); }; |