From 2d9b73acd9653686eb5d9b7e919848895051ab0d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 20 Feb 2015 18:40:54 +0200 Subject: [PATCH] Clear the critical flag one track earlier 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libr2c2/trainrouteplanner.cpp b/source/libr2c2/trainrouteplanner.cpp index b6d2f07..0140f43 100644 --- a/source/libr2c2/trainrouteplanner.cpp +++ b/source/libr2c2/trainrouteplanner.cpp @@ -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; -- 2.43.0