]> 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 614bce9657916152431cda52c1ce0853ba76c318..698cb4595ac5fa1091993ad78842b855ee9ca0c6 100644 (file)
@@ -54,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;
        }
 }