diff options
author | matthijs <matthijs@openttd.org> | 2005-06-22 01:06:04 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2005-06-22 01:06:04 +0000 |
commit | 4806ac05a7ddd4f9c4db79b6df44598c0f260997 (patch) | |
tree | 15085c6d753332cc9874068ee699b24dd797c6fd | |
parent | 003b4e7f15f0ee86dd9f4296452c1512c8e860df (diff) | |
download | openttd-4806ac05a7ddd4f9c4db79b6df44598c0f260997.tar.xz |
(svn r2471) - Fix: [ 1221249 ] [NPF] Vehicles try to drive into a tunnel entrance from above.
-rw-r--r-- | npf.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -461,6 +461,12 @@ void NPFFollowTrack(AyStar* aystar, OpenListNode* current) { } } + /* 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 |