]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/AILocalTraffic.cxx
Added static port system and a new altimeter model connected to it.
[flightgear.git] / src / ATC / AILocalTraffic.cxx
index d95d929d65c54d9f1c48651da06562076b403c42..a705d753dea9575cf037ea4592cbf9476796b88f 100644 (file)
@@ -28,6 +28,7 @@
 ******************************************************************/
 
 #include <Main/globals.hxx>
+#include <Model/loader.hxx>
 //#include <simgear/constants.h>
 #include <simgear/math/point3d.hxx>
 #include <simgear/math/sg_geodesy.hxx>
@@ -48,12 +49,11 @@ FGAILocalTraffic::~FGAILocalTraffic() {
 void FGAILocalTraffic::Init() {
     // Hack alert - Hardwired path!!
     string planepath = "Aircraft/c172/Models/c172-dpm.ac";
-    SGPath path = globals->get_fg_root();
-    path.append(planepath);
-    ssgTexturePath((char*)path.dir().c_str());
-    model = ssgLoad((char*)planepath.c_str());
+    model = globals->get_model_loader()->load_model(planepath);
     if (model == 0) {
-       model = ssgLoad((char*)"Models/Geometry/glider.ac");
+       model =
+            globals->get_model_loader()
+            ->load_model("Models/Geometry/glider.ac");
        if (model == 0)
            cout << "Failed to load an aircraft model in AILocalTraffic\n";
     } else {