From 29606c0de66de3c40074eb086410ef39951e0d86 Mon Sep 17 00:00:00 2001 From: smatz Date: Sat, 5 Dec 2009 19:21:43 +0000 Subject: (svn r18412) -Fix [FS#3350]: don't allow sending ships to rail waypoints and trains to buyos (Hirundo) --- src/order_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index a01305d5f..91726579e 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -553,10 +553,12 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 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; } -- cgit v1.2.3-70-g09d2