summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 1ce1631ee..c987b007b 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -525,6 +525,8 @@ int32 CmdBuildRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
Engine *e;
uint tile;
+ if (!(IsEngineBuildable(p1, VEH_Train))) return CMD_ERROR;
+
_cmd_build_rail_veh_var1 = 0;
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);