summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-08-03 14:15:52 +0000
committermichi_cc <michi_cc@openttd.org>2012-08-03 14:15:52 +0000
commitbfbf74fe7d2bf314669b1d794d7e66a838668a35 (patch)
treea6b5b3da12c1bb69d8690eeb95453353a6613303
parent31815447295459010b7a9c544d40b8cdd4a30058 (diff)
downloadopenttd-bfbf74fe7d2bf314669b1d794d7e66a838668a35.tar.xz
(svn r24457) -Fix [FS#5264] (r23087): Changing auto-refit for a 'goto station' order was inadvertently modifying the full load state.
-rw-r--r--src/order_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 1f8066086..0ce3059c9 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1617,7 +1617,7 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
order->SetRefit(cargo, subtype);
/* Make the depot order an 'always go' order. */
- if (cargo != CT_NO_REFIT) {
+ if (cargo != CT_NO_REFIT && order->IsType(OT_GOTO_DEPOT)) {
order->SetDepotOrderType((OrderDepotTypeFlags)(order->GetDepotOrderType() & ~ODTFB_SERVICE));
order->SetDepotActionType((OrderDepotActionFlags)(order->GetDepotActionType() & ~ODATFB_HALT));
}