From 163e741774e97cd018d591beb1527830cdcbcae7 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 29 Aug 2009 17:01:39 +0000 Subject: (svn r17307) -Fix [NoAI]: AIRail::RemoveRailTrack returned ERR_PRECONDITION_ERROR for road/rail-crossings --- src/ai/api/ai_rail.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2