summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-04 22:57:50 +0000
committerrubidium <rubidium@openttd.org>2008-05-04 22:57:50 +0000
commita1e77073fe94f6f244ede900dad929b8c78023f2 (patch)
treee22940c935638977339bfe694f7025c0864b4afb /src
parente6bc8fa3d89248ef471f40736e5b02b8ea07bf33 (diff)
downloadopenttd-a1e77073fe94f6f244ede900dad929b8c78023f2.tar.xz
(svn r12949) -Fix [FS#1978]: no loading/no unloading orders were 'forgotten' during manual replaces.
Diffstat (limited to 'src')
-rw-r--r--src/order_cmd.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 24c8ade89..4a951065a 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -364,10 +364,13 @@ CommandCost CmdInsertOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* Filter invalid load/unload types. */
switch (new_order.GetLoadType()) {
- case OLF_LOAD_IF_POSSIBLE: case OLFB_FULL_LOAD: case OLF_FULL_LOAD_ANY: break;
+ case OLF_LOAD_IF_POSSIBLE: case OLFB_FULL_LOAD: case OLF_FULL_LOAD_ANY: case OLFB_NO_LOAD: break;
+ default: return CMD_ERROR;
+ }
+ switch (new_order.GetUnloadType()) {
+ case OUF_UNLOAD_IF_POSSIBLE: case OUFB_UNLOAD: case OUFB_TRANSFER: case OUFB_NO_UNLOAD: break;
default: return CMD_ERROR;
}
- if (new_order.GetUnloadType() & ~(OUFB_UNLOAD | OUFB_TRANSFER)) return CMD_ERROR;
break;
}