]> git.tdb.fi Git - r2c2.git/commit
Fix critical block logic
authorMikko Rasa <tdb@tdb.fi>
Thu, 12 Feb 2015 14:46:45 +0000 (16:46 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 12 Feb 2015 15:52:19 +0000 (17:52 +0200)
commitecd7af790bd3ab7c7e768f68968379e1feea56a9
tree8ef01eca1b601076f141039c510794651f197503
parent19a73af1fb956636cb8b9d563ffb6a42e827a5bf
Fix critical block logic

First noncritical block is not reliable, as it could be outside of the
train's allocated blocks and not guaranteed to set to a consistent path.
Worse, the get_first_noncritical_block function could return a block on
the other side of a turnout which is changing path, and is_block_critical
used completely different logic.
source/libr2c2/train.cpp
source/libr2c2/train.h
source/libr2c2/trainrouteplanner.cpp
source/libr2c2/trainrouter.cpp