diff options
author | rubidium <rubidium@openttd.org> | 2008-04-06 07:07:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-06 07:07:21 +0000 |
commit | e68b2088ce090c1eaf182e120195d8453f4f02c2 (patch) | |
tree | 914d1e0005bd1676636f2860ef07b9137d189d14 /src/vehicle.cpp | |
parent | 630d5ad766c8632e9b47aed2de97b4996c9fa216 (diff) | |
download | openttd-e68b2088ce090c1eaf182e120195d8453f4f02c2.tar.xz |
(svn r12586) -Codechange: do not access an order's refit variables directly.
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 |