mirror of https://github.com/OpenTTD/OpenTTD
(svn r19320) -Fix (r19291): Forgot to set error message.
parent
c395b93acd
commit
71d28afe67
|
@ -1478,8 +1478,11 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||||
TileY(endtile) >= sy && TileY(endtile) <= ey) continue;
|
TileY(endtile) >= sy && TileY(endtile) <= ey) continue;
|
||||||
|
|
||||||
/* When not coverting rail <-> el. rail, any vehicle cannot be in tunnel/bridge */
|
/* When not coverting rail <-> el. rail, any vehicle cannot be in tunnel/bridge */
|
||||||
if (!IsCompatibleRail(GetRailType(tile), totype) &&
|
if (!IsCompatibleRail(GetRailType(tile), totype)) {
|
||||||
TunnelBridgeIsFree(tile, endtile).Failed()) continue;
|
CommandCost ret = TunnelBridgeIsFree(tile, endtile);
|
||||||
|
ret.SetGlobalErrorMessage();
|
||||||
|
if (ret.Failed()) continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
Track track = DiagDirToDiagTrack(GetTunnelBridgeDirection(tile));
|
Track track = DiagDirToDiagTrack(GetTunnelBridgeDirection(tile));
|
||||||
|
|
Loading…
Reference in New Issue