]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/engineer.cpp
Add some shortcut functions for getting endpoints
[r2c2.git] / source / engineer / engineer.cpp
index 68b85aa04cf3c3acdc8c89bd438b3ffcc75a5400..e7b047d311b42db72493adfc2d0e290ae95c7343 100644 (file)
@@ -219,7 +219,7 @@ void Engineer::tick()
                                delete picking_path;
                                picking_path = new Path3D(*track);
                                if(picking_entry>=0)
-                                       picking_path->set_mask(picking_track->get_type().get_endpoints()[picking_entry].paths);
+                                       picking_path->set_mask(picking_track->get_type().get_endpoint(picking_entry).paths);
                                else
                                        picking_path->set_mask(picking_track->get_type().get_paths());
                                picking_path->set_color(GL::Color(0));
@@ -271,7 +271,7 @@ void Engineer::button_press(int x, int y, unsigned btn, unsigned)
                else if(btn==3 && picking_entry>=0)
                {
                        picking_entry = (picking_entry+1)%picking_track->get_type().get_endpoints().size();
-                       picking_path->set_mask(picking_track->get_type().get_endpoints()[picking_entry].paths);
+                       picking_path->set_mask(picking_track->get_type().get_endpoint(picking_entry).paths);
                }
        }
        else