mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +08:00
[Weather] Only send weather if activated
This commit is contained in:
committed by
Mat Sutcliffe
parent
bba07ef4c4
commit
1fb97755ce
@@ -884,11 +884,16 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
if (!this->isSimulatorPluginAvailable()) { return; }
|
if (!this->isSimulatorPluginAvailable()) { return; }
|
||||||
if (!m_simulatorPlugin.second) { return; }
|
if (!m_simulatorPlugin.second) { return; }
|
||||||
if (m_simulatorPlugin.second->identifier() == identifier)
|
|
||||||
|
if (m_simulatorPlugin.second && m_simulatorPlugin.second->identifier() == identifier)
|
||||||
|
{
|
||||||
|
// ONLY send if WEATHER is ON
|
||||||
|
if (m_simulatorPlugin.second->isWeatherActivated())
|
||||||
{
|
{
|
||||||
m_simulatorPlugin.second->injectWeatherGrid(weatherGrid);
|
m_simulatorPlugin.second->injectWeatherGrid(weatherGrid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CContextSimulator::xCtxUpdateSimulatorCockpitFromContext(const CSimulatedAircraft &ownAircraft, const CIdentifier &originator)
|
void CContextSimulator::xCtxUpdateSimulatorCockpitFromContext(const CSimulatedAircraft &ownAircraft, const CIdentifier &originator)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -899,6 +899,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
if (this->isShuttingDownOrDisconnected()) { return; }
|
if (this->isShuttingDownOrDisconnected()) { return; }
|
||||||
if (weatherGrid.isEmpty()) { return; }
|
if (weatherGrid.isEmpty()) { return; }
|
||||||
|
if (!this->isWeatherActivated()) { return; }
|
||||||
|
|
||||||
if (!CThreadUtils::isCurrentThreadObjectThread(this))
|
if (!CThreadUtils::isCurrentThreadObjectThread(this))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user