mirror of https://github.com/OpenTTD/OpenTTD
(svn r20944) -Codechange: Bail out early in DrawBridgePillars(). (uni657)
parent
58ed553068
commit
3866d8e2d1
|
@ -845,8 +845,8 @@ static void DrawBridgePillars(const PalSpriteID *psid, const TileInfo *ti, Axis
|
||||||
static const int back_pillar_offset[2] = { 0, 9}; ///< sprite position offset of back facing pillar
|
static const int back_pillar_offset[2] = { 0, 9}; ///< sprite position offset of back facing pillar
|
||||||
|
|
||||||
SpriteID image = psid->sprite;
|
SpriteID image = psid->sprite;
|
||||||
|
if (image == 0) return;
|
||||||
|
|
||||||
if (image != 0) {
|
|
||||||
/* "side" specifies the side the pillars stand on.
|
/* "side" specifies the side the pillars stand on.
|
||||||
* The length of the pillars is then set to the height of the bridge over the corners of this edge.
|
* The length of the pillars is then set to the height of the bridge over the corners of this edge.
|
||||||
*
|
*
|
||||||
|
@ -885,7 +885,6 @@ static void DrawBridgePillars(const PalSpriteID *psid, const TileInfo *ti, Axis
|
||||||
AddSortableSpriteToDraw(image, psid->pal, x_back, y_back, w, h, BB_HEIGHT_UNDER_BRIDGE - PILLAR_Z_OFFSET, cur_z, IsTransparencySet(TO_BRIDGES), 0, 0, -PILLAR_Z_OFFSET);
|
AddSortableSpriteToDraw(image, psid->pal, x_back, y_back, w, h, BB_HEIGHT_UNDER_BRIDGE - PILLAR_Z_OFFSET, cur_z, IsTransparencySet(TO_BRIDGES), 0, 0, -PILLAR_Z_OFFSET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue