X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrainrouter.cpp;h=65a4a24500206cb0286a1f5cb3da4efc22358c7c;hb=1124a98ce5e1edee1904eeec089976d446601afd;hp=462af3853d5f04200eef5a0ca657e2006daad28e;hpb=a7e320b46a7d4070613b3210c28e65f579750f37;p=r2c2.git diff --git a/source/libr2c2/trainrouter.cpp b/source/libr2c2/trainrouter.cpp index 462af38..65a4a24 100644 --- a/source/libr2c2/trainrouter.cpp +++ b/source/libr2c2/trainrouter.cpp @@ -57,6 +57,14 @@ bool TrainRouter::set_route(const Route *r) train.stop_at(0); arriving = 0; + /* TODO destination should also be cleared when manually setting a different + route, but not when the planner calls this. */ + if(!r) + { + dest_zone = 0; + dest_block = 0; + } + train.refresh_blocks_from(*fncb); const Route *route = get_route();