summaryrefslogtreecommitdiff
path: root/src/roadstop.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-18 21:34:06 +0000
committerrubidium <rubidium@openttd.org>2009-12-18 21:34:06 +0000
commit6f1982d15149a3649a6ae7f24caaeace8d3809d9 (patch)
treef8e5974c2983ba20abaa8706b31247dd2c5eace8 /src/roadstop.cpp
parent6f5425a062db70049c7be823004393c88ec714eb (diff)
downloadopenttd-6f1982d15149a3649a6ae7f24caaeace8d3809d9.tar.xz
(svn r18531) -Fix [FS#3384] (r18404): for articulated road vehicles only the first part was accounted for, so for extremely short fronts and lots after it the spreading did not work as it should.
Diffstat (limited to 'src/roadstop.cpp')
-rw-r--r--src/roadstop.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/roadstop.cpp b/src/roadstop.cpp
index ce9bd62ee..6b8c921c1 100644
--- a/src/roadstop.cpp
+++ b/src/roadstop.cpp
@@ -279,7 +279,7 @@ bool RoadStop::Enter(RoadVehicle *rv)
*/
void RoadStop::Entry::Leave(const RoadVehicle *rv)
{
- this->occupied -= rv->rcache.cached_veh_length;
+ this->occupied -= rv->rcache.cached_total_length;
assert(this->occupied >= 0);
}
@@ -292,7 +292,7 @@ void RoadStop::Entry::Enter(const RoadVehicle *rv)
/* 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;
+ this->occupied += rv->rcache.cached_total_length;
}
/**
@@ -368,7 +368,7 @@ void RoadStop::Entry::Rebuild(const RoadStop *rs, int side)
this->occupied = 0;
for (RVList::iterator it = rserh.vehicles.begin(); it != rserh.vehicles.end(); it++) {
- this->occupied += (*it)->rcache.cached_veh_length;
+ this->occupied += (*it)->rcache.cached_total_length;
}
}