1
0
Fork 0

src/Main/globals.cxx: don't load /ai/models/ from autosave.xml file.

This cleans things up if earlier 'next' build as added spurious property items
to autosave.
This commit is contained in:
Julian Smith 2020-03-11 00:07:56 +00:00
parent 20a9953130
commit ab7e7ec7b4

View file

@ -808,6 +808,14 @@ FGGlobals::loadUserSettings(SGPath userDataPath)
} else {
tryAutosaveMigration(userDataPath, &autosave);
}
/* Before 2020-03-10, we could save portions of the /ai/models/ tree, which
confuses things when loaded again. So delete any such items if they have
been loaded. */
SGPropertyNode* ai = autosave.getNode("ai");
if (ai) {
SGPropertyNode* ai_models = ai->getNode("models");
ai->removeChildren("models");
}
copyProperties(&autosave, globals->get_props());
}