]> git.tdb.fi Git - r2c2.git/commitdiff
Also check if the clock is stopped
authorMikko Rasa <tdb@tdb.fi>
Sun, 15 Feb 2015 07:20:57 +0000 (09:20 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 15 Feb 2015 07:20:57 +0000 (09:20 +0200)
source/libr2c2/trainrouter.cpp

index 4a5c2bb084a43ce6977d6145f448027364a34aba..5a8d9f7e16cfde6f2654c5f23a696f70bd0e4bc4 100644 (file)
@@ -232,7 +232,8 @@ void TrainRouter::tick(const Time::TimeDelta &dt)
        if(planner && planner->check()!=TrainRoutePlanner::PENDING)
                apply_plan(train.get_layout(), *planner);
 
-       if(!train.get_layout().get_driver().is_halted())
+       Layout &layout = train.get_layout();
+       if(!layout.get_driver().is_halted() && !layout.get_clock().is_stopped())
        {
                if(delay)
                {