From 3edb967ecf7dbf17a4d7e98975cd99345ce5a3f9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 6 Apr 2008 07:07:21 +0000 Subject: (svn r12586) -Codechange: do not access an order's refit variables directly. --- src/vehicle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicle.cpp') 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 -- cgit v1.2.3-54-g00ecf