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/order_gui.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/order_gui.cpp')
-rw-r--r-- | src/order_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 03cbb3e6b..00d3a1fbc 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -225,9 +225,9 @@ static void DrawOrdersWindow(Window *w) if (order->flags & OFB_FULL_LOAD) s++; /* service at */ SetDParam(1, s); - if (order->refit_cargo < NUM_CARGO) { + if (order->IsRefit()) { SetDParam(3, STR_REFIT_ORDER); - SetDParam(4, GetCargo(order->refit_cargo)->name); + SetDParam(4, GetCargo(order->GetRefitCargo())->name); } else { SetDParam(3, STR_EMPTY); } @@ -263,8 +263,6 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile) Order order; order.next = NULL; order.index = 0; - order.refit_cargo = CT_INVALID; - order.refit_subtype = 0; // check depot first if (_patches.gotodepot) { |