mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #863 Change interpolation setup member to be a method parameter instead.
This commit is contained in:
@@ -48,9 +48,10 @@ namespace XBus
|
||||
// also to disable aircraft parts / or logging parts (log file). I wonder if you want to consider it here
|
||||
// e.g. interpolator->getInterpolatorSetup().getLogCallsigns().contains(callsign)
|
||||
// if the setup is needed more than once, store it here to avoid multiple locks
|
||||
BlackMisc::Simulation::CInterpolationAndRenderingSetup setup;
|
||||
BlackMisc::Simulation::CInterpolationHints hints;
|
||||
BlackMisc::Simulation::IInterpolator::PartsStatus status;
|
||||
hints.setAircraftParts(interpolator->getInterpolatedParts(callsign, parts, -1, status));
|
||||
hints.setAircraftParts(interpolator->getInterpolatedParts(callsign, parts, -1, setup, status));
|
||||
hints.setElevationProvider([this](const auto & situation)
|
||||
{
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
@@ -338,8 +339,9 @@ namespace XBus
|
||||
{
|
||||
if (plane->situations.size() < 3) { return xpmpData_Unavailable; } // avoid sudden movements when a pilot connects
|
||||
|
||||
BlackMisc::Simulation::CInterpolationAndRenderingSetup setup;
|
||||
BlackMisc::Simulation::IInterpolator::InterpolationStatus status;
|
||||
const auto situation = m_interpolator->getInterpolatedSituation(plane->callsign, plane->situations, -1, plane->hints(m_interpolator), status);
|
||||
const auto situation = m_interpolator->getInterpolatedSituation(plane->callsign, plane->situations, -1, setup, plane->hints(m_interpolator), status);
|
||||
if (! status.didInterpolationSucceed()) { return xpmpData_Unavailable; }
|
||||
if (! status.hasChangedPosition()) { return xpmpData_Unchanged; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user