Changeset - r3461:08b95b694a8c
[Not reviewed]
master
0 1 0
celestar - 18 years ago 2006-04-07 07:19:14
celestar@openttd.org
(svn r4305) -Codechange: Minor elrail cleanup (Tron)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
elrail.c
Show inline comments
 
@@ -163,13 +163,13 @@ static void DrawCatenaryRailway(const Ti
 
	   1) INSIDE a tunnel (we wouldn't see it anyway)
 
	   2) on the "far" end of a bridge head (the one that connects to bridge middle),
 
	      because that one is drawn on the bridge. Exception is for length 0 bridges
 
	      which have no middle tiles */
 
	trackconfig[TS_HOME] = GetRailTrackBitsUniversal(ti->tile, &OverridePCP);
 
	/* If a track bit is present that is not in the main direction, the track is level */
 
	isflat[TS_HOME] = trackconfig[TS_HOME] & (TRACK_BIT_UPPER | TRACK_BIT_LOWER | TRACK_BIT_LEFT | TRACK_BIT_RIGHT);
 
	isflat[TS_HOME] = trackconfig[TS_HOME] & (TRACK_BIT_HORZ | TRACK_BIT_VERT);
 

	
 
	AdjustTileh(ti->tile, &tileh[TS_HOME]);
 

	
 
	for (i = DIAGDIR_NE; i < DIAGDIR_END; i++) {
 
		TileIndex neighbour = ti->tile + TileOffsByDir(i);
 
		uint foundation = 0;
 
@@ -177,13 +177,13 @@ static void DrawCatenaryRailway(const Ti
 

	
 
		/* Here's one of the main headaches. GetTileSlope does not correct for possibly
 
		   existing foundataions, so we do have to do that manually later on.*/
 
		tileh[TS_NEIGHBOUR] = GetTileSlope(neighbour, NULL);
 
		trackconfig[TS_NEIGHBOUR] = GetRailTrackBitsUniversal(neighbour, NULL);
 
		if (IsTunnelTile(neighbour) && i != GetTunnelDirection(neighbour)) trackconfig[TS_NEIGHBOUR] = 0;
 
		isflat[TS_NEIGHBOUR] = trackconfig[TS_NEIGHBOUR] & (TRACK_BIT_UPPER | TRACK_BIT_LOWER | TRACK_BIT_LEFT | TRACK_BIT_RIGHT);
 
		isflat[TS_NEIGHBOUR] = trackconfig[TS_NEIGHBOUR] & (TRACK_BIT_HORZ | TRACK_BIT_VERT);
 

	
 
		PPPpreferred[i] = 0xFF; /* We start with preferring everything (end-of-line in any direction) */
 
		PPPallowed[i] = AllowedPPPonPCP[i];
 

	
 
		/* We cycle through all the existing tracks at a PCP and see what
 
		   PPPs we want to have, or may not have at all */
0 comments (0 inline, 0 general)