]> git.tdb.fi Git - r2c2.git/commitdiff
Begin arrival immediately if the entire route has already been reserved
authorMikko Rasa <tdb@tdb.fi>
Wed, 16 Apr 2014 18:55:39 +0000 (21:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 16 Apr 2014 19:04:50 +0000 (22:04 +0300)
source/libr2c2/trainrouter.cpp

index 5b2c5ee2f768e962cbbe669fb6f46425f6185d9e..0885bd2861d1e8c81eff3cc8b1f6d415fa8cee22 100644 (file)
@@ -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);