]> git.tdb.fi Git - r2c2.git/commitdiff
Don't check sequence points while applying routes
authorMikko Rasa <tdb@tdb.fi>
Sun, 15 Feb 2015 15:46:22 +0000 (17:46 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 15 Feb 2015 15:48:48 +0000 (17:48 +0200)
The preceding train's routes might not be applied yet.  Instead queue a
sequence check to be done when all routes have been applied.

source/libr2c2/trainrouter.cpp

index 5a8d9f7e16cfde6f2654c5f23a696f70bd0e4bc4..9a9d338728140a8edcec2420a821535c9dca38d9 100644 (file)
@@ -119,7 +119,7 @@ void TrainRouter::route_changed()
                if(!sequence_points.empty())
                {
                        const SequencePoint &sp = sequence_points.front();
-                       if(sp.block==fncb.block() && !sp.is_cleared())
+                       if(sp.block==fncb.block() && sp.preceding_train)
                        {
                                arrival = WAITING_FOR_SEQUENCE;
                                sequence_check_pending = true;