(svn r21100) -Feature [NewGRF]: Add CB36 support for road vehicle property 0x15 (Speed).

This commit is contained in:
terkhen
2010-11-06 13:11:24 +00:00
parent 18e3a3ddfc
commit b65df93121
4 changed files with 8 additions and 4 deletions

View File

@@ -294,8 +294,10 @@ uint Engine::GetDisplayMaxSpeed() const
case VEH_TRAIN:
return GetEngineProperty(this->index, PROP_TRAIN_SPEED, this->u.rail.max_speed);
case VEH_ROAD:
return this->u.road.max_speed / 2;
case VEH_ROAD: {
uint max_speed = GetEngineProperty(this->index, PROP_ROADVEH_SPEED, 0);
return (max_speed != 0) ? max_speed * 2 : this->u.road.max_speed / 2;
}
case VEH_SHIP:
return GetEngineProperty(this->index, PROP_SHIP_SPEED, this->u.ship.max_speed) / 2;