(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:
Darkvater
2006-04-15 20:07:42 +00:00
parent f69fcf400e
commit d63fad7a7b
4 changed files with 11 additions and 11 deletions

View File

@@ -26,6 +26,10 @@ static inline bool IsLevelCrossing(TileIndex t)
return GetRoadType(t) == ROAD_CROSSING;
}
static inline bool IsLevelCrossingTile(TileIndex t)
{
return IsTileType(t, MP_STREET) && IsLevelCrossing(t);
}
static inline RoadBits GetRoadBits(TileIndex t)
{