diff options
author | terkhen <terkhen@openttd.org> | 2010-10-30 14:31:49 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-10-30 14:31:49 +0000 |
commit | c87e023d7a4e594eac97e371cbe6ce515402bec1 (patch) | |
tree | e95e729d682f8f6f0a3c444910b5cb6a16dc06d8 /src/engine.cpp | |
parent | 0baf335be3af23144a61a7230686b8811dc953ba (diff) | |
download | openttd-c87e023d7a4e594eac97e371cbe6ce515402bec1.tar.xz |
(svn r21058) -Feature [NewGRF]: Add CB36 support for road vehicle properties 0x13 (Power), 0x14 (Weight) and 0x18 (Tractive effort).
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index e563ac9f5..55358b63f 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -319,7 +319,7 @@ uint Engine::GetPower() const case VEH_TRAIN: return GetEngineProperty(this->index, PROP_TRAIN_POWER, this->u.rail.power); case VEH_ROAD: - return this->u.road.power * 10; + return GetEngineProperty(this->index, PROP_ROADVEH_POWER, this->u.road.power) * 10; default: NOT_REACHED(); } @@ -337,7 +337,7 @@ uint Engine::GetDisplayWeight() const case VEH_TRAIN: return GetEngineProperty(this->index, PROP_TRAIN_WEIGHT, this->u.rail.weight) << (this->u.rail.railveh_type == RAILVEH_MULTIHEAD ? 1 : 0); case VEH_ROAD: - return this->u.road.weight / 4; + return GetEngineProperty(this->index, PROP_ROADVEH_WEIGHT, this->u.road.weight) / 4; default: NOT_REACHED(); } @@ -355,7 +355,7 @@ uint Engine::GetDisplayMaxTractiveEffort() const case VEH_TRAIN: return (10 * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_TRAIN_TRACTIVE_EFFORT, this->u.rail.tractive_effort)) / 256; case VEH_ROAD: - return (10 * this->GetDisplayWeight() * this->u.road.tractive_effort) / 256; + return (10 * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_ROADVEH_TRACTIVE_EFFORT, this->u.road.tractive_effort)) / 256; default: NOT_REACHED(); } |