diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 6cf8db4680..6d70c09e43 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1019,7 +1019,9 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1, if (IsTileType(tile, MP_TUNNELBRIDGE)) { if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) return CMD_ERROR; CommandCost ret = EnsureNoTrainOnTrack(GetOtherTunnelBridgeEnd(tile), track); - //if (ret.Failed()) return ret; + if (ret.Failed()) return ret; + ret = EnsureNoTrainOnTrack(tile, track); + if (ret.Failed()) return ret; } else if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) { return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK); } @@ -1492,6 +1494,8 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1 CommandCost ret = EnsureNoTrainOnTrack(GetOtherTunnelBridgeEnd(tile), track); if (ret.Failed()) return ret; + ret = EnsureNoTrainOnTrack(tile, track); + if (ret.Failed()) return ret; } else { if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) { return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);