Ref T296, adding scenery offset as situation member plus utility functions

* frontOrNull/backOrNull
* added offset in model
* style/renaming
This commit is contained in:
Klaus Basan
2018-07-30 15:34:50 +02:00
parent 90df1e2521
commit c8fc50e787
11 changed files with 105 additions and 22 deletions

View File

@@ -80,7 +80,7 @@ namespace BlackMisc
// get the changes, we need the second value as we want to look in the past
// the first value is already based on the latest situation
const CAircraftSituationChangeList changes = this->remoteAircraftSituationChanges(m_callsign);
m_pastSituationsChange = (changes.size() > 1) ? changes[1] : CAircraftSituationChange::null();
m_pastSituationsChange = changes.indexOrNull(1);
// fixing offset
if (setup.isFixingSceneryOffset() && m_pastSituationsChange.hasSceneryDeviation() && m_model.hasCG())