Changeset - r2009:0590f0d71d41
[Not reviewed]
master
0 1 0
hackykid - 19 years ago 2005-07-04 15:25:06
hackykid@openttd.org
(svn r2517) - Fix: [pbs] Detect end-of-lines properly regarding depots.
1 file changed with 4 insertions and 4 deletions:
npf.c
4
4
0 comments (0 inline, 0 general)
npf.c
Show inline comments
 
@@ -37,8 +37,8 @@ bool IsEndOfLine(TileIndex tile, Trackdi
 
		return false;
 

	
 
	// depot
 
	if (IsTileDepotType(tile, TRANSPORT_RAIL))
 
		return false;
 
	if (IsTileDepotType(tile, TRANSPORT_RAIL) && (exitdir != GetDepotDirection(tile, TRANSPORT_RAIL)))
 
		return true;
 

	
 
	/* Calculate next tile */
 
	dst_tile = tile + TileOffsByDir(exitdir);
 
@@ -51,14 +51,14 @@ bool IsEndOfLine(TileIndex tile, Trackdi
 

	
 
	{
 
		byte src_type = GetTileRailType(tile, trackdir);
 
		byte dst_type = GetTileRailType(dst_tile, TrackdirToExitdir(trackdir));
 
		byte dst_type = GetTileRailType(dst_tile, exitdir);
 
		if (src_type != dst_type) {
 
			return true;
 
		}
 
		if (GetTileOwner(tile) != GetTileOwner(dst_tile))
 
			return true;
 

	
 
		if (IsTileDepotType(dst_tile, TRANSPORT_RAIL) && (TrackdirToExitdir(trackdir) != ReverseDiagdir(GetDepotDirection(dst_tile, TRANSPORT_RAIL))))
 
		if (IsTileDepotType(dst_tile, TRANSPORT_RAIL) && (exitdir != ReverseDiagdir(GetDepotDirection(dst_tile, TRANSPORT_RAIL))))
 
			return true;
 

	
 
		/* Check for oneway signal against us */
0 comments (0 inline, 0 general)