diff options
author | michi_cc <michi_cc@openttd.org> | 2009-03-05 16:14:56 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2009-03-05 16:14:56 +0000 |
commit | 09f95fa8017c6ad907e21147d217015aeac2e6a0 (patch) | |
tree | 6fe1d959eaef667879e16cfa3920e44fca8af903 /src/yapf | |
parent | 0619b4a3890036c9ddda5ab26af0ce5ab2419642 (diff) | |
download | openttd-09f95fa8017c6ad907e21147d217015aeac2e6a0.tar.xz |
(svn r15619) -Fix [FS#2701]: When trying to reserve a self-crossing path the failed reservation was sometimes not cleared completely.
Diffstat (limited to 'src/yapf')
-rw-r--r-- | src/yapf/yapf_rail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yapf/yapf_rail.cpp b/src/yapf/yapf_rail.cpp index c8789897f..0f5415052 100644 --- a/src/yapf/yapf_rail.cpp +++ b/src/yapf/yapf_rail.cpp @@ -81,7 +81,7 @@ private: } } - return tile != m_res_dest; + return tile != m_res_dest || td != m_res_dest_td; } /** Unreserve a single track/platform. Stops when the previous failer is reached. */ @@ -97,7 +97,7 @@ private: } else if (tile != m_res_fail_tile || td != m_res_fail_td) { UnreserveRailTrack(tile, TrackdirToTrack(td)); } - return tile != m_res_dest && (tile != m_res_fail_tile || td != m_res_fail_td); + return (tile != m_res_dest || td != m_res_dest_td) && (tile != m_res_fail_tile || td != m_res_fail_td); } public: |