Changeset - r1965:719ba8934486
[Not reviewed]
master
0 1 0
matthijs - 19 years ago 2005-06-22 01:06:04
matthijs@openttd.org
(svn r2471) - Fix: [ 1221249 ] [NPF] Vehicles try to drive into a tunnel entrance from above.
1 file changed with 6 insertions and 0 deletions:
npf.c
6
0 comments (0 inline, 0 general)
npf.c
Show inline comments
 
@@ -461,6 +461,12 @@ void NPFFollowTrack(AyStar* aystar, Open
 
		}
 
	}
 

	
 
	/* I can't enter a tunnel entry/exit tile from a tile above the tunnel. Note
 
	 * that I can enter the tunnel from a tile below the tunnel entrance. This
 
	 * solves the problem of vehicles wanting to drive off a tunnel entrance */
 
	if (IsTileType(dst_tile, MP_TUNNELBRIDGE) && (_map5[dst_tile] & 0xF0) == 0 && GetTileZ(dst_tile) < GetTileZ(src_tile))
 
		return;
 

	
 
	/* check correct rail type (mono, maglev, etc)
 
	 * XXX: This now compares with the previous tile, which should not pose a
 
	 * problem, but it might be nicer to compare with the first tile, or even
0 comments (0 inline, 0 general)