(svn r12949) -Fix [FS#1978]: no loading/no unloading orders were 'forgotten' during manual replaces.
authorrubidium
Sun, 04 May 2008 22:57:50 +0000
changeset 10407 f23e83b45b98
parent 10406 90fcf10584eb
child 10408 c9baa47d1342
(svn r12949) -Fix [FS#1978]: no loading/no unloading orders were 'forgotten' during manual replaces.
src/order_cmd.cpp
--- a/src/order_cmd.cpp	Sun May 04 22:38:18 2008 +0000
+++ b/src/order_cmd.cpp	Sun May 04 22:57:50 2008 +0000
@@ -364,10 +364,13 @@
 
 			/* 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;
 			}
-			if (new_order.GetUnloadType() & ~(OUFB_UNLOAD | OUFB_TRANSFER)) 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;
+			}
 			break;
 		}