From: Mikko Rasa Date: Sun, 27 Jan 2013 13:26:18 +0000 (+0200) Subject: Mark turnout blocks before the next sensor as current X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e6b49ce4c5833ab90733aee8e42413f7c75d9da7;p=r2c2.git Mark turnout blocks before the next sensor as current This avoids a problem where a train leaving a station wouldn't get the following turnouts as current if they needed switching, and consequently could trigger an emergency for not reaching a sensor in time. --- diff --git a/source/libr2c2/train.cpp b/source/libr2c2/train.cpp index ab52ce6..936f74a 100644 --- a/source/libr2c2/train.cpp +++ b/source/libr2c2/train.cpp @@ -1105,6 +1105,8 @@ void Train::check_turnout_paths(bool set) if(i==clear_blocks_end) ++clear_blocks_end; + if(i==cur_blocks_end && !(*i)->get_sensor_id()) + ++cur_blocks_end; } }