diff options
Diffstat (limited to 'src/pathfinder/npf/npf.cpp')
-rw-r--r-- | src/pathfinder/npf/npf.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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); |