diff options
author | smatz <smatz@openttd.org> | 2009-12-05 19:21:43 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-12-05 19:21:43 +0000 |
commit | 29606c0de66de3c40074eb086410ef39951e0d86 (patch) | |
tree | 06bde79b40e909822da53d504603b668950ea19b /src | |
parent | be4027ea5693b0a393731a10d1abc7d444d6d803 (diff) | |
download | openttd-29606c0de66de3c40074eb086410ef39951e0d86.tar.xz |
(svn r18412) -Fix [FS#3350]: don't allow sending ships to rail waypoints and trains to buyos (Hirundo)
Diffstat (limited to 'src')
-rw-r--r-- | src/order_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |