]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainpanel.cpp
New routing system for trains
[r2c2.git] / source / engineer / trainpanel.cpp
index d6066cb1c5a962e489032b4d9d8eda0ef6bbc7d5..1076fedaedbbb17152084bb337d6f0e69d89c97f 100644 (file)
@@ -279,6 +279,6 @@ void TrainPanel::go_to(Track *track, unsigned)
        pick_conn.disconnect();
 
        TrainRouter *router = train.get_ai_of_type<TrainRouter>();
-       if(!router || !router->go_to(*track))
-               engineer.set_status("Could not set route");
+       if(router)
+               router->set_destination(track->get_block());
 }