summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-08 00:16:31 +0000
committerrubidium <rubidium@openttd.org>2009-12-08 00:16:31 +0000
commit42f3a1e909210a4f2df06c3aacb9dd49e62b6174 (patch)
treedad5d2220fb7abd440cf997029d5489067ea1f75 /src
parent1e416f90fa4b44c379f53847b5d0a2d0ecebc055 (diff)
downloadopenttd-42f3a1e909210a4f2df06c3aacb9dd49e62b6174.tar.xz
(svn r18429) -Fix [FS#3360]: when road vehicles are, because of the 'jam protection' running through eachother more vehicles could be in a road stop than there could be under normal circumstances. As such an assert when the road stop's limits are reached isn't good.
Diffstat (limited to 'src')
-rw-r--r--src/roadstop.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/roadstop.cpp b/src/roadstop.cpp
index 9547814b7..ce9bd62ee 100644
--- a/src/roadstop.cpp
+++ b/src/roadstop.cpp
@@ -289,7 +289,9 @@ void RoadStop::Entry::Leave(const RoadVehicle *rv)
*/
void RoadStop::Entry::Enter(const RoadVehicle *rv)
{
- assert(this->occupied < this->length);
+ /* we cannot assert on this->occupied < this->length because of the
+ * remote possibility that RVs are running through eachother when
+ * trying to prevention an infinite jam. */
this->occupied += rv->rcache.cached_veh_length;
}