mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T296, provider stores scenery offset in situation
This commit is contained in:
@@ -295,8 +295,20 @@ namespace BlackMisc
|
||||
const CAircraftSituationChange change(updatedSituations, situationCorrected.getCG(), aircraftModel.isVtol(), true, true);
|
||||
this->storeChange(change);
|
||||
|
||||
if (change.hasSceneryDeviation())
|
||||
{
|
||||
const CLength offset = change.getGuessedSceneryDeviation();
|
||||
situationCorrected.setSceneryOffset(offset);
|
||||
|
||||
QWriteLocker lock(&m_lockSituations);
|
||||
m_latestSituationByCallsign[cs].setSceneryOffset(offset);
|
||||
m_situationsByCallsign[cs].front().setSceneryOffset(offset);
|
||||
}
|
||||
|
||||
// situation has been added
|
||||
emit this->addedAircraftSituation(situationCorrected);
|
||||
|
||||
// bye
|
||||
return situationCorrected;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user