mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T270, interpolator optimization by passing aircraft number
Rational: Except for FS9 we interpolate all aircraft in one loop at the same time. This can cause that some steps are always done at the same time for all aircraft of that loop. By passing the number we can more equally distribute such tasks, avoiding peaks.
This commit is contained in:
@@ -1254,6 +1254,7 @@ namespace BlackSimPlugin
|
||||
// interpolation for all remote aircraft
|
||||
const QList<CSimConnectObject> simObjects(m_simConnectObjects.values());
|
||||
|
||||
int simObjectNumber = 0;
|
||||
for (const CSimConnectObject &simObject : simObjects)
|
||||
{
|
||||
// happening if aircraft is not yet added to simulator or to be deleted
|
||||
@@ -1270,7 +1271,7 @@ namespace BlackSimPlugin
|
||||
const bool sendGround = setup.isSendingGndFlagToSimulator();
|
||||
|
||||
// Interpolated situation
|
||||
const CInterpolationResult result = simObject.getInterpolation(currentTimestamp, setup);
|
||||
const CInterpolationResult result = simObject.getInterpolation(currentTimestamp, setup, simObjectNumber++);
|
||||
if (result.getInterpolationStatus().hasValidSituation())
|
||||
{
|
||||
// update situation
|
||||
|
||||
Reference in New Issue
Block a user