Changeset - r10108:f68f755cf412
[Not reviewed]
master
0 1 0
frosch - 16 years ago 2008-09-11 19:44:30
frosch@openttd.org
(svn r14292) -Cleanup (r11128): Move an 'if' out of a loop as it does not need to be iterated. (spotted by smatz)
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/elrail.cpp
Show inline comments
 
@@ -346,6 +346,9 @@ static void DrawCatenaryRailway(const Ti
 
		}
 
	}
 

	
 
	/* The wire above the tunnel is drawn together with the tunnel-roof (see DrawCatenaryOnTunnel()) */
 
	if (IsTunnelTile(ti->tile)) return;
 

	
 
	/* Don't draw a wire under a low bridge */
 
	if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
 
		uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
 
@@ -356,7 +359,6 @@ static void DrawCatenaryRailway(const Ti
 
	/* Drawing of pylons is finished, now draw the wires */
 
	for (Track t = TRACK_BEGIN; t < TRACK_END; t++) {
 
		if (HasBit(trackconfig[TS_HOME], t)) {
 
			if (IsTunnelTile(ti->tile)) break; // drawn together with tunnel-roof (see DrawCatenaryOnTunnel())
 
			byte PCPconfig = HasBit(PCPstatus, PCPpositions[t][0]) +
 
				(HasBit(PCPstatus, PCPpositions[t][1]) << 1);
 

	
0 comments (0 inline, 0 general)