]> git.tdb.fi Git - r2c2.git/commitdiff
Clear the critical flag one track earlier
authorMikko Rasa <tdb@tdb.fi>
Fri, 20 Feb 2015 16:40:54 +0000 (18:40 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 20 Feb 2015 16:40:54 +0000 (18:40 +0200)
Check_arrival is called when the train reaches the end of its current
track.  The flag should be cleared when the track it is entering is no
longer critical.

source/libr2c2/trainrouteplanner.cpp

index b6d2f07cb66203ded55f3471110f94a0270287c0..0140f439a7a61ba8ec80570f4c42430ae8c64afe 100644 (file)
@@ -375,7 +375,7 @@ bool TrainRoutePlanner::TrainRoutingState::check_arrival()
                        }
                }
 
-       if(info->first_noncritical->has_track(*track))
+       if(info->first_noncritical->has_track(*next_track))
                critical = false;
 
        return false;