changeset 13883:8a9a3fcfabe6 draft

(svn r18412) -Fix [FS#3350]: don't allow sending ships to rail waypoints and trains to buyos (Hirundo)
author smatz <smatz@openttd.org>
date Sat, 05 Dec 2009 19:21:43 +0000
parents e3efddacc9f6
children 0ee48164ffe2
files src/order_cmd.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -553,10 +553,12 @@
 				default: return CMD_ERROR;
 
 				case VEH_TRAIN:
+					if (!(wp->facilities & FACIL_TRAIN)) return_cmd_error(STR_ERROR_CAN_T_ADD_ORDER);
 					if (!CheckOwnership(wp->owner)) return CMD_ERROR;
 					break;
 
 				case VEH_SHIP:
+					if (!(wp->facilities & FACIL_DOCK)) return_cmd_error(STR_ERROR_CAN_T_ADD_ORDER);
 					if (!CheckOwnership(wp->owner) && wp->owner != OWNER_NONE) return CMD_ERROR;
 					break;
 			}