mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Synchronize model set in simulator context and improved setting of model set in matcher (ignored when same simulator)
This commit is contained in:
@@ -517,8 +517,15 @@ namespace BlackCore
|
||||
return icao;
|
||||
}
|
||||
|
||||
int CAircraftMatcher::setModelSet(const CAircraftModelList &models, const CSimulatorInfo &simulator)
|
||||
int CAircraftMatcher::setModelSet(const CAircraftModelList &models, const CSimulatorInfo &simulator, bool forced)
|
||||
{
|
||||
if (!simulator.isSingleSimulator()) { return 0; }
|
||||
if (!forced && m_simulator == simulator && m_modelSet.size() > 0)
|
||||
{
|
||||
// same simulator with models
|
||||
return m_modelSet.size();
|
||||
}
|
||||
|
||||
CAircraftModelList modelsCleaned(models);
|
||||
const int r1 = modelsCleaned.removeAllWithoutModelString();
|
||||
const int r2 = modelsCleaned.removeIfExcluded();
|
||||
|
||||
Reference in New Issue
Block a user