X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftimetable.cpp;h=0d68a7be8aea5c88f515a60192e4aac62d6267ce;hb=9f0d428e974defa64cdf8e7b7072967327250958;hp=7ce8127d433b7995a6b9ff91aa9f1f0f53909f60;hpb=b652dfb998dd416d26f909798e58964ef84eda11;p=r2c2.git diff --git a/source/libr2c2/timetable.cpp b/source/libr2c2/timetable.cpp index 7ce8127..0d68a7b 100644 --- a/source/libr2c2/timetable.cpp +++ b/source/libr2c2/timetable.cpp @@ -116,7 +116,7 @@ void Timetable::save(list &st) const } } -void Timetable::check_update(list::const_iterator i) +void Timetable::check_update(const list::const_iterator &i) { for(list::const_iterator j=current_row; (j!=rows.end() && j!=i); ++j) if(j->type==ARRIVE) @@ -178,7 +178,7 @@ void Timetable::update_route() { if(i->type==ARRIVE) { - train.ai_message(Message("set-destination", i->target)); + train.ai_message(Message("add-waypoint", i->target)); break; } else if(i->type==DEPART) @@ -186,8 +186,7 @@ void Timetable::update_route() Time::TimeDelta dt = i->time-clock.get_current_time(); while(dttype==THROUGH) train.ai_message(Message("add-waypoint", i->target));