From: Mikko Rasa Date: Sun, 15 Feb 2015 07:20:57 +0000 (+0200) Subject: Also check if the clock is stopped X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=64a4768a48db0f8fde3bf93c512024698f12e3ca;p=r2c2.git Also check if the clock is stopped --- diff --git a/source/libr2c2/trainrouter.cpp b/source/libr2c2/trainrouter.cpp index 4a5c2bb..5a8d9f7 100644 --- a/source/libr2c2/trainrouter.cpp +++ b/source/libr2c2/trainrouter.cpp @@ -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) {