Maik Justus:
Here the patch that makes fg search for multiplayer aircraft in AI/Aircraft first.
This commit is contained in:
parent
0ebe4798a9
commit
b34dc24bdc
1 changed files with 12 additions and 2 deletions
|
@ -128,12 +128,22 @@ void FGAIBase::Transform() {
|
||||||
bool FGAIBase::init() {
|
bool FGAIBase::init() {
|
||||||
|
|
||||||
if (!model_path.empty()) {
|
if (!model_path.empty()) {
|
||||||
|
SGPath ai_path("AI");
|
||||||
|
ai_path.append(model_path);
|
||||||
try {
|
try {
|
||||||
model = load3DModel( globals->get_fg_root(), model_path, props,
|
model = load3DModel( globals->get_fg_root(), ai_path.str(), props,
|
||||||
globals->get_sim_time_sec() );
|
globals->get_sim_time_sec() );
|
||||||
} catch (const sg_exception &e) {
|
} catch (const sg_exception &e) {
|
||||||
model = NULL;
|
model = NULL;
|
||||||
}
|
}
|
||||||
|
if (!model) {
|
||||||
|
try {
|
||||||
|
model = load3DModel( globals->get_fg_root(), model_path, props,
|
||||||
|
globals->get_sim_time_sec() );
|
||||||
|
} catch (const sg_exception &e) {
|
||||||
|
model = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (model.get()) {
|
if (model.get()) {
|
||||||
aip.init( model.get() );
|
aip.init( model.get() );
|
||||||
|
|
Loading…
Add table
Reference in a new issue