diff options
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 22ebef2fb..48d8e42bb 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -273,7 +273,7 @@ static CommandCost RefitVehicle(Vehicle *v, bool only_this, uint8 num_vehicles, for (; v != NULL; v = (only_this ? NULL : v->Next())) { if (v->type == VEH_TRAIN && !vehicles_to_refit.Contains(v->index) && !only_this) continue; - const Engine *e = Engine::Get(v->engine_type); + const Engine *e = v->GetEngine(); if (!e->CanCarryCargo()) continue; /* If the vehicle is not refittable, count its capacity nevertheless if the cargo matches */ @@ -789,7 +789,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint break; } } else { - const Engine *e = Engine::Get(v->engine_type); + const Engine *e = v->GetEngine(); CargoID initial_cargo = (e->CanCarryCargo() ? e->GetDefaultCargoType() : (CargoID)CT_INVALID); if (v->cargo_type != initial_cargo && initial_cargo != CT_INVALID) { |