diff options
author | terkhen <terkhen@openttd.org> | 2010-11-09 17:43:05 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-09 17:43:05 +0000 |
commit | 6a38925ca3d3865f7f9de8cee37a6226d12af4d9 (patch) | |
tree | 479ce8e41b6c5cd1e74656d66462205c96e885d0 /src/ship_cmd.cpp | |
parent | e1ff8aeb09cded7fe1651f0a7fa06d145d723607 (diff) | |
download | openttd-6a38925ca3d3865f7f9de8cee37a6226d12af4d9.tar.xz |
(svn r21123) -Codechange: Remove max_speed from the Vehicle class.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index f220e13a0..3882dc8e3 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -155,7 +155,7 @@ static void CheckIfShipNeedsService(Vehicle *v) void Ship::UpdateCache() { - this->vcache.cached_max_speed = GetVehicleProperty(this, PROP_SHIP_SPEED, this->max_speed); + this->vcache.cached_max_speed = GetVehicleProperty(this, PROP_SHIP_SPEED, ShipVehInfo(this->engine_type)->max_speed); } Money Ship::GetRunningCost() const @@ -604,7 +604,6 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u v->cargo_cap = svi->capacity; v->last_station_visited = INVALID_STATION; - v->max_speed = svi->max_speed; v->engine_type = e->index; v->reliability = e->reliability; |