1
0
Fork 0

Fix AI Scenarios

Due to e43fe82094 models in AI scenarios were
being searched down the AI/Aircraft and Aircraft paths, where in fact
they are by default a full path from FGDATA.

This fixes the problem by setting DATA_ONLY as the search order.
Other search orders can be set in the scenario file by setting
the search-order tag to "DATA_ONLY", "PREFER_AI", "PREFER_DATA"
This commit is contained in:
Stuart Buchanan 2019-05-15 21:09:49 +01:00
parent 16b178a2d9
commit 5f2f72a4eb

View file

@ -249,6 +249,9 @@ void FGAIBase::readFromScenario(SGPropertyNode* scFileNode)
setSMPath(submodels->getStringValue("path", ""));
}
// By default, scenarios include the full path to any aircraft.
_searchOrder = DATA_ONLY;
string searchOrder = scFileNode->getStringValue("search-order", "");
if (!searchOrder.empty()) {
if (searchOrder == "DATA_ONLY") {