Mercurial > hg > openttd
changeset 14732:bc24b932b8dc draft
(svn r19320) -Fix (r19291): Forgot to set error message.
author | alberth <alberth@openttd.org> |
---|---|
date | Fri, 05 Mar 2010 21:34:12 +0000 |
parents | 9d61b2f8f104 |
children | c657ed9816cc |
files | src/rail_cmd.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1478,8 +1478,11 @@ 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));