summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2010-12-15 14:33:24 +0000
committermichi_cc <michi_cc@openttd.org>2010-12-15 14:33:24 +0000
commite744b97ec8bfe567136200096d2279bce982d160 (patch)
tree58c4abe433179344cba7f37c25431b25dd071dc0 /src/pathfinder/yapf
parentfc42e98226f37b1b32bd9b34ca6fc7d06c9f0c27 (diff)
downloadopenttd-e744b97ec8bfe567136200096d2279bce982d160.tar.xz
(svn r21524) -Fix [FS#4302]: Do not apply the last signal red pathfinder penalty when the signal is a path signal.
Diffstat (limited to 'src/pathfinder/yapf')
-rw-r--r--src/pathfinder/yapf/yapf_costrail.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp
index 5c445843a..4b965f2e0 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -587,8 +587,8 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
if (n.m_last_red_signal_type == SIGTYPE_EXIT) {
/* last signal was red pre-signal-exit */
extra_cost += Yapf().PfGetSettings().rail_lastred_exit_penalty;
- } else {
- /* last signal was red, but not exit */
+ } else if (!IsPbsSignal(n.m_last_red_signal_type)) {
+ /* Last signal was red, but not exit or path signal. */
extra_cost += Yapf().PfGetSettings().rail_lastred_penalty;
}
}