From 0a2bd90a3d4f5e7333eba59f29e4a0fbcb11175e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 23 Feb 2015 12:13:25 +0200 Subject: [PATCH] Reset wait time estimate when the train starts moving again Just in case the estimate was too high. --- source/libr2c2/trainrouteplanner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libr2c2/trainrouteplanner.cpp b/source/libr2c2/trainrouteplanner.cpp index e083087..87b7cb5 100644 --- a/source/libr2c2/trainrouteplanner.cpp +++ b/source/libr2c2/trainrouteplanner.cpp @@ -627,7 +627,10 @@ bool TrainRoutePlanner::RoutingStep::update_states() i->state = BLOCKED; } else if(i->state==BLOCKED) + { + i->estimated_wait = Time::zero; i->state = MOVING; + } } else i->state = BLOCKED; -- 2.43.0