From e744b97ec8bfe567136200096d2279bce982d160 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Wed, 15 Dec 2010 14:33:24 +0000 Subject: (svn r21524) -Fix [FS#4302]: Do not apply the last signal red pathfinder penalty when the signal is a path signal. --- src/pathfinder/npf/npf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pathfinder/npf/npf.cpp') diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index e8e13f5fd..4f277cdcc 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -469,8 +469,9 @@ static int32 NPFRailPathCost(AyStar *as, AyStarNode *current, OpenListNode *pare } } } - /* Record the state of this signal */ - NPFSetFlag(current, NPF_FLAG_LAST_SIGNAL_RED, true); + /* Record the state of this signal. Path signals are assumed to + * be green as the signal state of them has no meaning for this. */ + NPFSetFlag(current, NPF_FLAG_LAST_SIGNAL_RED, !IsPbsSignal(sigtype)); } else { /* Record the state of this signal */ NPFSetFlag(current, NPF_FLAG_LAST_SIGNAL_RED, false); -- cgit v1.2.3-54-g00ecf