mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T683, use slow updates in FS9 for thins not to be updated every cycle
This commit is contained in:
committed by
Mat Sutcliffe
parent
0360704b0b
commit
fa6101d02b
@@ -386,6 +386,9 @@ namespace BlackMisc
|
|||||||
//! Get model string
|
//! Get model string
|
||||||
const QString &getModelString() const { return m_models[CurrentModel].getModelString(); }
|
const QString &getModelString() const { return m_models[CurrentModel].getModelString(); }
|
||||||
|
|
||||||
|
//! Get CG from model
|
||||||
|
const PhysicalQuantities::CLength &getCG() const { return m_models[CurrentModel].getCG(); }
|
||||||
|
|
||||||
//! Set model string
|
//! Set model string
|
||||||
void setModelString(const QString &modelString);
|
void setModelString(const QString &modelString);
|
||||||
|
|
||||||
|
|||||||
@@ -396,9 +396,17 @@ namespace BlackSimPlugin
|
|||||||
requestWeatherGrid(weatherGrid, { this, &CSimulatorFs9::injectWeatherGrid });
|
requestWeatherGrid(weatherGrid, { this, &CSimulatorFs9::injectWeatherGrid });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // weather
|
||||||
|
|
||||||
reverseLookupAndUpdateOwnAircraftModel(simDataOwnAircraft.getModelString());
|
// slow updates
|
||||||
|
if (m_ownAircraftUpdateCycles % 25 == 0)
|
||||||
|
{
|
||||||
|
this->reverseLookupAndUpdateOwnAircraftModel(simDataOwnAircraft.getModelString());
|
||||||
|
const CLength cg = simDataOwnAircraft.getCG();
|
||||||
|
if (!cg.isNull()) { this->updateOwnCG(cg); }
|
||||||
|
} // slow updates
|
||||||
|
|
||||||
|
m_ownAircraftUpdateCycles++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorFs9::disconnectAllClients()
|
void CSimulatorFs9::disconnectAllClients()
|
||||||
|
|||||||
Reference in New Issue
Block a user