X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrainrouter.cpp;h=a40e8ffb23d3c369fc70e2e6712115ce44f4bf67;hb=6223ead021d5e02ab0a6d3aed83d5c8b420cacb6;hp=f0870d250f2b7b95293797a2c86a8c72addf56c1;hpb=d3d1850e950f3c38c8ef983228013fc82c287ec4;p=r2c2.git diff --git a/source/libr2c2/trainrouter.cpp b/source/libr2c2/trainrouter.cpp index f0870d2..a40e8ff 100644 --- a/source/libr2c2/trainrouter.cpp +++ b/source/libr2c2/trainrouter.cpp @@ -294,11 +294,14 @@ void TrainRouter::block_reserved(Block &block, Train *t) return; // Are we waiting for the other train to pass a sequence point? - SequencePoint &sp = sequence_points.front(); - if(sp.preceding_train==t && sp.block==&block) - /* The other train's router will advance its sequence on the same - signal and may not have handled it yet. */ - state = SEQUENCE_CHECK_PENDING; + if(state==WAITING_FOR_SEQUENCE) + { + SequencePoint &sp = sequence_points.front(); + if(sp.preceding_train==t && sp.block==&block) + /* The other train's router will advance its sequence on the same + signal and may not have handled it yet. */ + state = SEQUENCE_CHECK_PENDING; + } return; }