summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-03-05 16:14:56 +0000
committermichi_cc <michi_cc@openttd.org>2009-03-05 16:14:56 +0000
commita4aba77e49f59640160a9f903ac45d22b3e69df1 (patch)
tree6fe1d959eaef667879e16cfa3920e44fca8af903 /src
parent71d5bdd074a3d821fa0ddc772d6594509627fc6f (diff)
downloadopenttd-a4aba77e49f59640160a9f903ac45d22b3e69df1.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')
-rw-r--r--src/yapf/yapf_rail.cpp4
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: