+ 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())
+ {
+ if(reverse)
+ track = track.reverse();
+ float offset = gate->get_offset_from_endpoint(track.entry());
+ if(reverse)
+ vehicles.back()->place(TrackOffsetIter(track, offset), VehiclePlacement::BACK_BUFFER);
+ else
+ vehicles.front()->place(TrackOffsetIter(track, offset), VehiclePlacement::FRONT_BUFFER);
+ break;
+ }