Mercurial > hg > openttd
diff src/engine.cpp @ 16347:8c9974e20b1c draft
(svn r21058) -Feature [NewGRF]: Add CB36 support for road vehicle properties 0x13 (Power), 0x14 (Weight) and 0x18 (Tractive effort).
author | terkhen <terkhen@openttd.org> |
---|---|
date | Sat, 30 Oct 2010 14:31:49 +0000 |
parents | c638d1941c58 |
children | f39955ef4720 |
line wrap: on
line diff
--- a/src/engine.cpp +++ b/src/engine.cpp @@ -319,7 +319,7 @@ 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 @@ 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 @@ 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(); }