mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r19320) -Fix (r19291): Forgot to set error message.
This commit is contained in:
parent
c395b93acd
commit
71d28afe67
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user