From: Mikko Rasa Date: Mon, 23 Feb 2015 10:13:25 +0000 (+0200) Subject: Reset wait time estimate when the train starts moving again X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0a2bd90a3d4f5e7333eba59f29e4a0fbcb11175e;p=r2c2.git Reset wait time estimate when the train starts moving again Just in case the estimate was too high. --- 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;