- travel_dist += i->get_path_length(i.entry());
-
- if(&*i==&block && !advancing && vehicles.front()->get_track())
+ track = track.flip();
+ vehicles.back()->place(track, VehiclePlacement::BACK_AXLE);
+ }
+ else
+ vehicles.front()->place(track, VehiclePlacement::FRONT_AXLE);
+ }
+ }
+ else if(BeamGate *gate = dynamic_cast<BeamGate *>(sensor))
+ {
+ if(!advancing && vehicles.front()->is_placed())
+ {
+ TrackIter track = allocator.iter_for(block).track_iter();
+ for(; (track && &track->get_block()==&block); track=track.next())
+ if(track.track()==gate->get_track())