(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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user