Ref T243, use offset times from network vatlib

* changed network config received signature (now with offset time)
* removed code to fix offset time, no longer needed
* using push_frontKeepLatestAdjustedFirst guaranteeing correct order
This commit is contained in:
Klaus Basan
2018-02-02 21:04:56 +01:00
parent 6e933b089c
commit 7e0c1033ba
3 changed files with 18 additions and 39 deletions

View File

@@ -327,7 +327,12 @@ namespace BlackMisc
m_aircraftParts.back().addMsecs(-10000); // number here does
m_aircraftParts.front().addMsecs(-5000); // not really matter
}
m_aircraftParts.push_front(parts);
// we add new situations at front and keep the latest values (real time) first
m_aircraftParts.push_frontKeepLatestFirst(parts, IRemoteAircraftProvider::MaxPartsPerCallsign);
if (!hasOffset) { m_aircraftParts.front().setTimeOffsetMs(offset); }
// force remote provider to cleanup
IRemoteAircraftProvider::removeOutdatedParts(m_aircraftParts);
qint64 offset = 6000; //! \fixme copied from CNetworkVatlib::c_positionTimeOffsetMsec