summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-03-13 17:51:29 +0000
committermatthijs <matthijs@openttd.org>2005-03-13 17:51:29 +0000
commitd631b1fa8c5c5849636de73335d8651bf5da6f9b (patch)
tree732898580f0956cf818a212884fab7166cab9255
parentde47d0935f56817f5a93a1d6d600ee2c6332a569 (diff)
downloadopenttd-d631b1fa8c5c5849636de73335d8651bf5da6f9b.tar.xz
(svn r2006) - Fix: [NPF] Wrong signal detection for last signal red detection. Multiple tracks per tile with only one signal were detected wrong. (HackyKid)
-rw-r--r--npf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/npf.c b/npf.c
index 2192a9f21..d8c66d55a 100644
--- a/npf.c
+++ b/npf.c
@@ -343,7 +343,7 @@ int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* parent) {
/* Determine extra costs */
/* Check for signals */
- if (IsTileType(tile, MP_RAILWAY) && (_map5[tile] & 0xC0) == 0x40) {
+ if (IsTileType(tile, MP_RAILWAY) && (_map5[tile] & 0xC0) == 0x40 && (_map3_lo[tile] & _signal_along_trackdir[trackdir]) != 0) {
/* Ordinary track with signals */
if ((_map2[tile] & _signal_along_trackdir[trackdir]) == 0) {
/* Signal facing us is red */