]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackattachment.cpp
Add a shortcut for getting the gauge of a TrackType
[r2c2.git] / source / libr2c2 / trackattachment.cpp
index b67ba5fbbb6274ac7c69f6e9d7710ad01930ce56..024166820dc8adcac64e2a2be16e710b19ed681b 100644 (file)
@@ -50,7 +50,7 @@ void TrackAttachment::attach_to_closest(float limit)
                        Snap sn;
                        sn.position = position;
                        sn.rotation = rotation;
-                       float gauge = (*i)->get_type().get_appearance().get_gauge();
+                       float gauge = (*i)->get_type().get_gauge();
                        if((*i)->snap(sn, gauge*limit, SNAP_SEGMENT))
                        {
                                float d = distance(position, sn.position);