mirror of https://github.com/OpenTTD/OpenTTD
(svn r12138) -Fix: do not allow adding tram to rail-road crossing when there is a vehicle on it
parent
3371d02449
commit
bb81de3c4c
|
@ -458,6 +458,7 @@ CommandCost CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
if (HasBit(GetRoadTypes(tile), rt)) return_cmd_error(STR_1007_ALREADY_BUILT);
|
if (HasBit(GetRoadTypes(tile), rt)) return_cmd_error(STR_1007_ALREADY_BUILT);
|
||||||
all_bits = GetCrossingRoadBits(tile);
|
all_bits = GetCrossingRoadBits(tile);
|
||||||
if (pieces & ComplementRoadBits(all_bits)) goto do_clear;
|
if (pieces & ComplementRoadBits(all_bits)) goto do_clear;
|
||||||
|
if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue