mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 02:12:37 +01:00
(svn r24425) [1.2] -Backport from trunk:
- Fix: [Windows] Unbreak NewGRF MD5 sum calculation. Macros and side effects do not mix, especially if there is some obscure '#define min' in a windows header that nobody thinks of [FS#5231] (r24416) - Fix: Disallow removing roadtypes from bridges when not dragging in bridge direction [FS#5221] (r24414) - Fix: Draw wires under low bridges if the bridge is transparent, not if the wire is transparent (r24403) - Fix: Station properties 11 and 14 were combined incorrectly [FS#5243] (r24402) - Fix: [Windows] Changing resolution did not resize the window (r24394)
This commit is contained in:
@@ -111,7 +111,6 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
|
||||
case MP_STATION:
|
||||
if (!HasStationRail(t)) return TRACK_BIT_NONE;
|
||||
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
|
||||
if (!IsStationTileElectrifiable(t)) return TRACK_BIT_NONE;
|
||||
return TrackToTrackBits(GetRailStationTrack(t));
|
||||
|
||||
default:
|
||||
@@ -409,7 +408,8 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||
}
|
||||
}
|
||||
|
||||
if (PPPallowed[i] != 0 && HasBit(PCPstatus, i) && !HasBit(OverridePCP, i)) {
|
||||
if (PPPallowed[i] != 0 && HasBit(PCPstatus, i) && !HasBit(OverridePCP, i) &&
|
||||
(!IsRailStationTile(ti->tile) || CanStationTileHavePylons(ti->tile))) {
|
||||
for (Direction k = DIR_BEGIN; k < DIR_END; k++) {
|
||||
byte temp = PPPorder[i][GetTLG(ti->tile)][k];
|
||||
|
||||
@@ -437,12 +437,15 @@ 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_CATENARY)) {
|
||||
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_BRIDGES)) {
|
||||
int height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
||||
|
||||
if (height <= GetTileMaxZ(ti->tile) + 1) return;
|
||||
}
|
||||
|
||||
/* Don't draw a wire if the station tile does not want any */
|
||||
if (IsRailStationTile(ti->tile) && !CanStationTileHaveWires(ti->tile)) return;
|
||||
|
||||
SpriteID wire_normal = GetWireBase(ti->tile);
|
||||
SpriteID wire_halftile = (halftile_corner != CORNER_INVALID) ? GetWireBase(ti->tile, TCX_UPPER_HALFTILE) : wire_normal;
|
||||
Track halftile_track;
|
||||
|
||||
Reference in New Issue
Block a user