From: Mikko Rasa Date: Sat, 29 Mar 2014 15:06:52 +0000 (+0200) Subject: Skip arrived trains when updating states in the route planner X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=776b39dfb0896aa563a220bdbf0b044425629917;p=r2c2.git Skip arrived trains when updating states in the route planner --- diff --git a/source/libr2c2/trainrouteplanner.cpp b/source/libr2c2/trainrouteplanner.cpp index 809bb3e..1c7d996 100644 --- a/source/libr2c2/trainrouteplanner.cpp +++ b/source/libr2c2/trainrouteplanner.cpp @@ -56,6 +56,9 @@ bool TrainRoutePlanner::update_states(RoutingStep &step) bool changes = false; for(vector::iterator i=next.trains.begin(); i!=next.trains.end(); ++i) { + if(i->state==ARRIVED) + continue; + TrainState old_state = i->state; if(i->state==BLOCKED) i->state = MOVING;