summaryrefslogtreecommitdiff
path: root/src/roadstop.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-12-14 21:33:53 +0000
committerterkhen <terkhen@openttd.org>2010-12-14 21:33:53 +0000
commit48b7916458de4b2cdbc226a4a6ab078db4c77e73 (patch)
treec3a49ca7a91890042ca56765574bc40a54c15f96 /src/roadstop.cpp
parenta93944e765776c6e9a2bd556457cd93748068da6 (diff)
downloadopenttd-48b7916458de4b2cdbc226a4a6ab078db4c77e73.tar.xz
(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
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 3e9e6ac93..921125f08 100644
--- a/src/roadstop.cpp
+++ b/src/roadstop.cpp
@@ -278,7 +278,7 @@ bool RoadStop::Enter(RoadVehicle *rv)
*/
void RoadStop::Entry::Leave(const RoadVehicle *rv)
{
- this->occupied -= rv->rcache.cached_total_length;
+ this->occupied -= rv->gcache.cached_total_length;
assert(this->occupied >= 0);
}
@@ -291,7 +291,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_total_length;
+ this->occupied += rv->gcache.cached_total_length;
}
/**
@@ -367,7 +367,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_total_length;
+ this->occupied += (*it)->gcache.cached_total_length;
}
}