diff options
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index c81baf4b6..bf3618517 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2243,11 +2243,11 @@ void VehicleEnterDepot(Vehicle *v) t = v->current_order; v->current_order.MakeDummy(); - if (t.refit_cargo < NUM_CARGO) { + if (t.IsRefit()) { CommandCost cost; _current_player = v->owner; - cost = DoCommand(v->tile, v->index, t.refit_cargo | t.refit_subtype << 8, DC_EXEC, GetCmdRefitVeh(v)); + cost = DoCommand(v->tile, v->index, t.GetRefitCargo() | t.GetRefitSubtype() << 8, DC_EXEC, GetCmdRefitVeh(v)); if (CmdFailed(cost)) { v->leave_depot_instantly = false; // We ensure that the vehicle stays in the depot |