X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.cpp;h=285a15a27fb83794bcffa9406c144b416e1d0079;hb=b0d402f30489b0618d21281781e1b8f683ed567b;hp=9cb032ec3f4a9a5663eece64a3048b76a103c10e;hpb=0443ca05cbd306487131f5f5bd3b91181ae4a733;p=r2c2.git diff --git a/source/libr2c2/train.cpp b/source/libr2c2/train.cpp index 9cb032e..285a15a 100644 --- a/source/libr2c2/train.cpp +++ b/source/libr2c2/train.cpp @@ -222,7 +222,7 @@ void Train::stop_at(Block *block) bool Train::is_block_critical(const Block &block) const { - return get_reserved_distance_until(&block)get_braking_distance()*1.3; + return get_reserved_distance_until(&block)<=controller->get_braking_distance()*1.3; } BlockIter Train::get_first_noncritical_block() const