(svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible

This commit is contained in:
rubidium
2014-09-21 11:24:51 +00:00
parent f3b79480ed
commit dc2b4f2498
14 changed files with 38 additions and 43 deletions

View File

@@ -407,7 +407,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
* Remove those (simply by ANDing with allowed, since these markers are never allowed) */
if ((PPPallowed[i] & PPPpreferred[i]) != 0) PPPallowed[i] &= PPPpreferred[i];
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile)) {
if (IsBridgeAbove(ti->tile)) {
Track bridgetrack = GetBridgeAxis(ti->tile) == AXIS_X ? TRACK_X : TRACK_Y;
int height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
@@ -446,7 +446,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
if (IsTunnelTile(ti->tile)) return;
/* Don't draw a wire under a low bridge */
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_BRIDGES)) {
if (IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_BRIDGES)) {
int height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
if (height <= GetTileMaxZ(ti->tile) + 1) return;