summaryrefslogtreecommitdiff
path: root/src/ship_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r--src/ship_cmd.cpp3
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;