[XPlane] Model set must not contain ACF models

Discussion: see https://discordapp.com/channels/539048679160676382/539064750055751690/648974956306366499
This commit is contained in:
Klaus Basan
2019-11-26 22:49:11 +01:00
committed by Mat Sutcliffe
parent b9ea40e8d1
commit 386a0ccd5d
4 changed files with 18 additions and 1 deletions

View File

@@ -438,6 +438,15 @@ namespace BlackMisc
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "No single simulator");
CAircraftModelList orderedModels(models);
orderedModels.setModelType(CAircraftModel::TypeOwnSimulatorModel); // unify type
if (simulator.isXPlane())
{
// see https://discordapp.com/channels/539048679160676382/539064750055751690/648974956306366499
// this solves the issue that ACF models are loaded in CSimulatorXPlane::loadCslPackages
const int removed = orderedModels.removeXPlaneFlyablePlanes();
if (removed > 0) { CLogMessage(this).info(u"Removed %1 flyable models from XPlane model set!"); }
}
if (orderedModels.needsOrder())
{
orderedModels.resetOrder();