From: Mikko Rasa Date: Wed, 16 Apr 2014 18:55:39 +0000 (+0300) Subject: Begin arrival immediately if the entire route has already been reserved X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d607c5454e63ac9be1384419a0ec5d561859c2a3;p=r2c2.git Begin arrival immediately if the entire route has already been reserved --- diff --git a/source/libr2c2/trainrouter.cpp b/source/libr2c2/trainrouter.cpp index 5b2c5ee..0885bd2 100644 --- a/source/libr2c2/trainrouter.cpp +++ b/source/libr2c2/trainrouter.cpp @@ -110,6 +110,12 @@ void TrainRouter::route_changed() train.stop_at(0); train.refresh_blocks_from(*fncb); } + else if(!arrival) + { + arrival = RESERVED_TO_END; + train.stop_at(&*fncb.flip()); + train.refresh_blocks_from(*fncb); + } const Route *route = get_route(); signal_route_changed.emit(route);