Use --fg-aircraft paths for AI model
Firstly search model in $fg-root/AI/ path, if not found, search model in --fg-aircraft paths, if not found, search model in $fg-root/Aircraft path This commit should solve the complaint "I have an aircraft in a separate Aircraft/ folder but during MP session other user are shown with the aircraft from the $fg-root/Aircraft path instead of this behaviour I want to see the aircraft from my separate Aircraft/ folder"
This commit is contained in:
parent
a46114da9a
commit
695a9be75d
1 changed files with 8 additions and 0 deletions
|
@ -358,6 +358,14 @@ bool FGAIBase::init(bool search_in_AI_path)
|
|||
BOOST_FOREACH(SGPath p, globals->get_data_paths("AI")) {
|
||||
paths.push_back(p.str());
|
||||
}
|
||||
|
||||
// search models in --fg-aircraft paths;
|
||||
// when a copy of an aircraft is in --fg-aircraft paths
|
||||
// we want to load this one instead of the default one from fgdata/Aircraft
|
||||
BOOST_FOREACH(SGPath p, globals->get_aircraft_paths()) {
|
||||
paths.push_back(p.str());
|
||||
}
|
||||
|
||||
f = osgDB::findDataFile(model_path, opt.get());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue