Changeset - r18317:48f72a1979ae
[Not reviewed]
master
0 1 0
yexo - 13 years ago 2011-11-08 17:51:29
yexo@openttd.org
(svn r23163) -Fix [FS#4627]: don't display railway fences between track and waypoints (Krille)
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/rail_cmd.cpp
Show inline comments
 
@@ -2444,71 +2444,71 @@ static void TileLoop_Track(TileIndex til
 
			case TRACK_BIT_RIGHT: new_ground = RAIL_GROUND_FENCE_VERT2;  break;
 

	
 
			default: {
 
				Owner owner = GetTileOwner(tile);
 

	
 
				if (rail == (TRACK_BIT_LOWER | TRACK_BIT_RIGHT) || (
 
							(rail & TRACK_BIT_3WAY_NW) == 0 &&
 
							(rail & TRACK_BIT_X)
 
						)) {
 
					TileIndex n = tile + TileDiffXY(0, -1);
 
					TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE);
 

	
 
					if (!IsTileType(n, MP_RAILWAY) ||
 
					if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) ||
 
							!IsTileOwner(n, owner) ||
 
							nrail == TRACK_BIT_UPPER ||
 
							nrail == TRACK_BIT_LEFT) {
 
						new_ground = RAIL_GROUND_FENCE_NW;
 
					}
 
				}
 

	
 
				if (rail == (TRACK_BIT_UPPER | TRACK_BIT_LEFT) || (
 
							(rail & TRACK_BIT_3WAY_SE) == 0 &&
 
							(rail & TRACK_BIT_X)
 
						)) {
 
					TileIndex n = tile + TileDiffXY(0, 1);
 
					TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE);
 

	
 
					if (!IsTileType(n, MP_RAILWAY) ||
 
					if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) ||
 
							!IsTileOwner(n, owner) ||
 
							nrail == TRACK_BIT_LOWER ||
 
							nrail == TRACK_BIT_RIGHT) {
 
						new_ground = (new_ground == RAIL_GROUND_FENCE_NW) ?
 
							RAIL_GROUND_FENCE_SENW : RAIL_GROUND_FENCE_SE;
 
					}
 
				}
 

	
 
				if (rail == (TRACK_BIT_LOWER | TRACK_BIT_LEFT) || (
 
							(rail & TRACK_BIT_3WAY_NE) == 0 &&
 
							(rail & TRACK_BIT_Y)
 
						)) {
 
					TileIndex n = tile + TileDiffXY(-1, 0);
 
					TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE);
 

	
 
					if (!IsTileType(n, MP_RAILWAY) ||
 
					if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) ||
 
							!IsTileOwner(n, owner) ||
 
							nrail == TRACK_BIT_UPPER ||
 
							nrail == TRACK_BIT_RIGHT) {
 
						new_ground = RAIL_GROUND_FENCE_NE;
 
					}
 
				}
 

	
 
				if (rail == (TRACK_BIT_UPPER | TRACK_BIT_RIGHT) || (
 
							(rail & TRACK_BIT_3WAY_SW) == 0 &&
 
							(rail & TRACK_BIT_Y)
 
						)) {
 
					TileIndex n = tile + TileDiffXY(1, 0);
 
					TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE);
 

	
 
					if (!IsTileType(n, MP_RAILWAY) ||
 
					if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) ||
 
							!IsTileOwner(n, owner) ||
 
							nrail == TRACK_BIT_LOWER ||
 
							nrail == TRACK_BIT_LEFT) {
 
						new_ground = (new_ground == RAIL_GROUND_FENCE_NE) ?
 
							RAIL_GROUND_FENCE_NESW : RAIL_GROUND_FENCE_SW;
 
					}
 
				}
 
				break;
 
			}
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)