From: Mikko Rasa Date: Tue, 23 Jul 2013 13:42:34 +0000 (+0300) Subject: Ignore path change events on currently occupied blocks X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b5e23ed067e75f17419dc04be872d2162eac01e9;p=r2c2.git Ignore path change events on currently occupied blocks --- diff --git a/source/libr2c2/blockallocator.cpp b/source/libr2c2/blockallocator.cpp index 3b70f5a..347960e 100644 --- a/source/libr2c2/blockallocator.cpp +++ b/source/libr2c2/blockallocator.cpp @@ -422,7 +422,7 @@ void BlockAllocator::reverse() void BlockAllocator::turnout_path_changing(Track &track) { - BlockList::iterator i = find_if(blocks.begin(), blocks.end(), BlockMatch(track.get_block())); + BlockList::iterator i = find_if(cur_blocks_end, blocks.end(), BlockMatch(track.get_block())); if(i!=blocks.end()) { ++i;