Durk Talsma:
Fix a couple of places that were not yet using SGPath
This commit is contained in:
parent
499c702ffb
commit
a7139a816c
3 changed files with 10 additions and 8 deletions
|
@ -137,7 +137,7 @@ bool FGAIBase::init() {
|
|||
|
||||
if (model_path != "") {
|
||||
model = load3DModel( globals->get_fg_root(),
|
||||
model_path.c_str(),
|
||||
SGPath(model_path).c_str(),
|
||||
props,
|
||||
globals->get_sim_time_sec() );
|
||||
}
|
||||
|
|
|
@ -1709,8 +1709,9 @@ bool fgInitSubsystems() {
|
|||
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();
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#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>
|
||||
|
@ -127,11 +128,11 @@ void FGTrafficManager::startElement (const char * name, const XMLAttributes &at
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue