mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #863 Change callsign parameter to be a member instead.
This commit is contained in:
@@ -122,6 +122,7 @@ namespace BlackSimPlugin
|
||||
const CTime &updateInterval, QObject *owner) :
|
||||
CDirectPlayPeer(owner, callsign),
|
||||
m_updateInterval(updateInterval),
|
||||
m_interpolator(callsign),
|
||||
m_modelName(modelName)
|
||||
{
|
||||
}
|
||||
@@ -184,7 +185,7 @@ namespace BlackSimPlugin
|
||||
CInterpolationStatus status;
|
||||
CInterpolationHints hints; // \fixme 201701 #865 KB if there is an elevation provider for FS9 add it here or set elevation
|
||||
hints.setLoggingInterpolation(this->getInterpolationSetup().getLogCallsigns().contains(m_callsign));
|
||||
const CAircraftSituation situation = this->m_interpolator.getInterpolatedSituation(m_callsign, -1, this->m_interpolationSetup, hints, status);
|
||||
const CAircraftSituation situation = this->m_interpolator.getInterpolatedSituation(-1, this->m_interpolationSetup, hints, status);
|
||||
|
||||
// Test only for successful interpolation. FS9 requires constant positions
|
||||
if (!status.didInterpolationSucceed()) { return; }
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace BlackSimPlugin
|
||||
|
||||
CSimConnectObject::CSimConnectObject(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, DWORD requestId) :
|
||||
m_aircraft(aircraft), m_requestId(requestId), m_validRequestId(true),
|
||||
m_interpolator(QSharedPointer<BlackMisc::Simulation::CInterpolatorLinear>::create())
|
||||
m_interpolator(QSharedPointer<BlackMisc::Simulation::CInterpolatorLinear>::create(aircraft.getCallsign()))
|
||||
{ }
|
||||
|
||||
bool CSimConnectObject::isPendingAdded() const
|
||||
|
||||
@@ -903,14 +903,14 @@ namespace BlackSimPlugin
|
||||
partsStatus.setSupportsParts(useAircraftParts);
|
||||
|
||||
const CInterpolationAndRenderingSetup setup(getInterpolationAndRenderingSetup());
|
||||
const CAircraftParts parts = useAircraftParts ? simObj.getInterpolator()->getInterpolatedParts(callsign, -1, setup, partsStatus, logInterpolationAndParts) : CAircraftParts();
|
||||
const CAircraftParts parts = useAircraftParts ? simObj.getInterpolator()->getInterpolatedParts(-1, setup, partsStatus, logInterpolationAndParts) : CAircraftParts();
|
||||
|
||||
// get interpolated situation
|
||||
CInterpolationStatus interpolatorStatus;
|
||||
CInterpolationHints hints(m_hints[simObj.getCallsign()]);
|
||||
hints.setAircraftParts(useAircraftParts ? parts : CAircraftParts(), useAircraftParts);
|
||||
hints.setLoggingInterpolation(logInterpolationAndParts);
|
||||
const CAircraftSituation interpolatedSituation = simObj.getInterpolator()->getInterpolatedSituation(callsign, currentTimestamp, setup, hints, interpolatorStatus);
|
||||
const CAircraftSituation interpolatedSituation = simObj.getInterpolator()->getInterpolatedSituation(currentTimestamp, setup, hints, interpolatorStatus);
|
||||
|
||||
if (interpolatorStatus.allTrue())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user