diff options
author | alberth <alberth@openttd.org> | 2010-03-05 21:34:12 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-03-05 21:34:12 +0000 |
commit | 71d28afe67af5635dfdd7b7af544e494a1d60a7b (patch) | |
tree | 8eb2d1de1e6453e7dea3ea58644dcd29f9539d4c | |
parent | c395b93acd69106df6005e66264d9114e0198440 (diff) | |
download | openttd-71d28afe67af5635dfdd7b7af544e494a1d60a7b.tar.xz |
(svn r19320) -Fix (r19291): Forgot to set error message.
-rw-r--r-- | src/rail_cmd.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index eb29fef07..c989c10fc 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1478,8 +1478,11 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 TileY(endtile) >= sy && TileY(endtile) <= ey) continue; /* When not coverting rail <-> el. rail, any vehicle cannot be in tunnel/bridge */ - if (!IsCompatibleRail(GetRailType(tile), totype) && - TunnelBridgeIsFree(tile, endtile).Failed()) continue; + if (!IsCompatibleRail(GetRailType(tile), totype)) { + CommandCost ret = TunnelBridgeIsFree(tile, endtile); + ret.SetGlobalErrorMessage(); + if (ret.Failed()) continue; + } if (flags & DC_EXEC) { Track track = DiagDirToDiagTrack(GetTunnelBridgeDirection(tile)); |