summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-04-15 20:07:42 +0000
committerDarkvater <darkvater@openttd.org>2006-04-15 20:07:42 +0000
commitd63fad7a7b7e0ff6bc6c32f119042a0317961255 (patch)
treee8d20cb7ee880010ebaa9d3fe99190d489a7abb4 /roadveh_cmd.c
parentf69fcf400e242d119498c0a4b99d7ec6d69d07b0 (diff)
downloadopenttd-d63fad7a7b7e0ff6bc6c32f119042a0317961255.tar.xz
(svn r4435) - Fix: an assertion triggered when trying to remove a bridge with the remove-tool (r4348 surfaced this). In CmdRemoveRoad tiletype was not checked for ownership. Intorudce IsLevelCrossingTile() which checks if a tile is a crossing without knowing the type. Suggested by peter1138 and Tron.
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 4c91e4ab9..574d4afb5 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -568,7 +568,7 @@ static void RoadVehCheckTrainCrash(Vehicle *v)
tile = v->tile;
- if (!IsTileType(tile, MP_STREET) || !IsLevelCrossing(tile)) return;
+ if (!IsLevelCrossingTile(tile)) return;
if (VehicleFromPos(tile, v, EnumCheckRoadVehCrashTrain) != NULL)
RoadVehCrash(v);