Ref T683, use slow updates in FS9 for thins not to be updated every cycle

This commit is contained in:
Klaus Basan
2019-06-13 01:53:09 +02:00
committed by Mat Sutcliffe
parent 0360704b0b
commit fa6101d02b
2 changed files with 13 additions and 2 deletions

View File

@@ -396,9 +396,17 @@ namespace BlackSimPlugin
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()