summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-08-29 17:01:39 +0000
committeryexo <yexo@openttd.org>2009-08-29 17:01:39 +0000
commit163e741774e97cd018d591beb1527830cdcbcae7 (patch)
treed8686b74ebd41372bb28098ab816ef56e84750ce /src
parent79a8da1c046dcb21ad86a03d7713ceb9fada5480 (diff)
downloadopenttd-163e741774e97cd018d591beb1527830cdcbcae7.tar.xz
(svn r17307) -Fix [NoAI]: AIRail::RemoveRailTrack returned ERR_PRECONDITION_ERROR for road/rail-crossings
Diffstat (limited to 'src')
-rw-r--r--src/ai/api/ai_rail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp
index 017e1c2d6..37589092c 100644
--- a/src/ai/api/ai_rail.cpp
+++ b/src/ai/api/ai_rail.cpp
@@ -235,7 +235,7 @@
/* static */ bool AIRail::RemoveRailTrack(TileIndex tile, RailTrack rail_track)
{
EnforcePrecondition(false, ::IsValidTile(tile));
- EnforcePrecondition(false, ::IsPlainRailTile(tile));
+ EnforcePrecondition(false, ::IsPlainRailTile(tile) || ::IsLevelCrossingTile(tile));
EnforcePrecondition(false, GetRailTracks(tile) & rail_track);
EnforcePrecondition(false, KillFirstBit((uint)rail_track) == 0);