]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/beamgate.cpp
Properly detect blocks as critical when a train is not moving
[r2c2.git] / source / libr2c2 / beamgate.cpp
index 550c97c4ca457ace5deed6f5c9fdec7ae8fe8562..698cb4595ac5fa1091993ad78842b855ee9ca0c6 100644 (file)
@@ -34,11 +34,6 @@ const BeamGateType &BeamGate::get_type() const
        return BeamGateType::instance();
 }
 
-void BeamGate::set_address(unsigned a)
-{
-       address = a;
-}
-
 void BeamGate::set_position(const Vector &p)
 {
        position = p;
@@ -59,9 +54,10 @@ void BeamGate::update_attachment()
 
        if(track)
        {
-               TrackPoint tp = track->get_point(track.entry(), offset);
-               position = tp.pos;
-               rotation = tp.dir;
+               OrientedPoint p = track.point();
+               position = p.position;
+               rotation = p.rotation;
+               tilt = p.tilt;
        }
 }