From 48b7916458de4b2cdbc226a4a6ab078db4c77e73 Mon Sep 17 00:00:00 2001 From: terkhen Date: Tue, 14 Dec 2010 21:33:53 +0000 Subject: (svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains. --- src/roadstop.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/roadstop.cpp') 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; } } -- cgit v1.2.3-54-g00ecf