summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2013-01-23 18:33:28 +0000
committerpeter1138 <peter1138@openttd.org>2013-01-23 18:33:28 +0000
commiteec1a0aa11a5863ee7b8d38dfe4b39ac08048640 (patch)
tree195a18548da019e7956bcc6507e201949a3efc20 /src
parentf9e531d69c81afcd7b529861f8076e46b8c210d9 (diff)
downloadopenttd-eec1a0aa11a5863ee7b8d38dfe4b39ac08048640.tar.xz
(svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders.
Diffstat (limited to 'src')
-rw-r--r--src/order_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 6bfaad9ce..c33642cf8 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1613,6 +1613,8 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
/* Automatic refit cargo is only supported for goto station orders. */
if (cargo == CT_AUTO_REFIT && !order->IsType(OT_GOTO_STATION)) return CMD_ERROR;
+ if (order->GetLoadType() & OLFB_NO_LOAD) return CMD_ERROR;
+
if (flags & DC_EXEC) {
order->SetRefit(cargo, subtype);