summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-14 10:19:16 +0000
committersmatz <smatz@openttd.org>2008-02-14 10:19:16 +0000
commite081e0712f2346ac9aea0d2ce8136c6c7565ae3b (patch)
tree5ee1407afa9faf63d5bee963b58c293af0e9d54d /src
parent6d333e5d3ed6af26ffc2b30e0bdb1c863a49bf70 (diff)
downloadopenttd-e081e0712f2346ac9aea0d2ce8136c6c7565ae3b.tar.xz
(svn r12138) -Fix: do not allow adding tram to rail-road crossing when there is a vehicle on it
Diffstat (limited to 'src')
-rw-r--r--src/road_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index e2480025b..405261d86 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -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);
all_bits = GetCrossingRoadBits(tile);
if (pieces & ComplementRoadBits(all_bits)) goto do_clear;
+ if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
break;
default: