summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-06 07:07:21 +0000
committerrubidium <rubidium@openttd.org>2008-04-06 07:07:21 +0000
commit3edb967ecf7dbf17a4d7e98975cd99345ce5a3f9 (patch)
tree914d1e0005bd1676636f2860ef07b9137d189d14 /src/vehicle.cpp
parent84e3fa75e1977375aafbd56219ac34a26f9f6d73 (diff)
downloadopenttd-3edb967ecf7dbf17a4d7e98975cd99345ce5a3f9.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.cpp4
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