mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
refs #865, allow to override in setGroundElevationFromHint
This commit is contained in:
committed by
Mathew Sutcliffe
parent
085f25fa86
commit
bc3bd41c97
@@ -321,9 +321,9 @@ namespace BlackMisc
|
||||
this->m_interpolationLogs.clear();
|
||||
}
|
||||
|
||||
void IInterpolator::setGroundElevationFromHint(const CInterpolationHints &hints, CAircraftSituation &situation)
|
||||
void IInterpolator::setGroundElevationFromHint(const CInterpolationHints &hints, CAircraftSituation &situation, bool override)
|
||||
{
|
||||
if (situation.hasGroundElevation()) { return; }
|
||||
if (!override && situation.hasGroundElevation()) { return; }
|
||||
const CAltitude elevation = hints.getGroundElevation(situation);
|
||||
if (elevation.isNull()) { return; }
|
||||
situation.setGroundElevation(elevation);
|
||||
|
||||
Reference in New Issue
Block a user