]> git.tdb.fi Git - r2c2.git/commitdiff
Reset wait time estimate when the train starts moving again
authorMikko Rasa <tdb@tdb.fi>
Mon, 23 Feb 2015 10:13:25 +0000 (12:13 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 23 Feb 2015 10:13:25 +0000 (12:13 +0200)
Just in case the estimate was too high.

source/libr2c2/trainrouteplanner.cpp

index e083087ba1b64354bef11f662dd4ea2bc36cf011..87b7cb57f606757f3f2a2cba8f9c3f1095807879 100644 (file)
@@ -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;