From d607c5454e63ac9be1384419a0ec5d561859c2a3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 16 Apr 2014 21:55:39 +0300 Subject: [PATCH] Begin arrival immediately if the entire route has already been reserved --- source/libr2c2/trainrouter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.43.0