return ((track->get_type().get_path_length(path)-offset)/info->speed)*Time::sec+delay;
}
-bool TrainRoutePlanner::TrainRoutingState::is_occupied(Track &trk) const
+bool TrainRoutePlanner::TrainRoutingState::is_occupying(Track &trk) const
{
OccupiedTrack *occ = occupied_tracks;
for(unsigned n=occ->n_tracks; n>0; --n, occ=occ->next)
int TrainRoutePlanner::RoutingStep::get_occupant(Track &track) const
{
for(unsigned i=0; i<trains.size(); ++i)
- if(trains[i].is_occupied(track))
+ if(trains[i].is_occupying(track))
return i;
return -1;
~TrainRoutingState();
Msp::Time::TimeDelta get_time_to_next_track() const;
- bool is_occupied(Track &) const;
+ bool is_occupying(Track &) const;
bool check_arrival();
void advance(float);
void advance_track(unsigned);