if (model_path != "") {
model = load3DModel( globals->get_fg_root(),
- model_path.c_str(),
+ SGPath(model_path).c_str(),
props,
globals->get_sim_time_sec() );
}
globals->add_subsystem("Traffic Manager", new FGTrafficManager);
FGTrafficManager *dispatcher =
(FGTrafficManager*) globals->get_subsystem("Traffic Manager");
-
- readXML(string(globals->get_fg_root() + string("/Traffic/fgtraffic.xml")),
+ SGPath path =globals->get_fg_root();
+ path.append("Traffic/fgtraffic.xml");
+ readXML(path.str(),
*dispatcher);
globals->get_subsystem("Traffic Manager")->init();
#include <simgear/compiler.h>
#include <simgear/math/polar3d.hxx>
#include <simgear/math/sg_geodesy.hxx>
+#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props.hxx>
#include <simgear/route/waypoint.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
if (attval != 0)
{
//cout << "including " << attval << endl;
- string path =
- globals->get_fg_root() +
- string("/Traffic/") +
- string(attval);
- readXML(path, *this);
+ SGPath path =
+ globals->get_fg_root();
+ path.append("/Traffic/");
+ path.append(attval);
+ readXML(path.str(), *this);
}
// cout << " " << atts.getName(i) << '=' << atts.getValue(i) << endl;
}