refs #332 send slew mode position packet instead of the full one

This bypasses the physics engine inside FS9
This commit is contained in:
Roland Winklmeier
2014-09-27 23:38:32 +02:00
parent 5ad9c9c30b
commit c533e9213a
3 changed files with 38 additions and 7 deletions

View File

@@ -97,16 +97,14 @@ namespace BlackSimPlugin
if (m_interpolator.hasEnoughAircraftSituations())
{
CAircraftSituation situation = m_interpolator.getCurrentSituation();
MPPositionVelocity positionVelocity = aircraftSituationtoFS9(m_lastAircraftSituation,
situation,
m_updateInterval.value(CTimeUnit::s()));
MPPositionSlewMode positionSlewMode = aircraftSituationtoFS9(situation);
QByteArray positionMessage;
MultiPlayerPacketParser::writeType(positionMessage, CFs9Sdk::MULTIPLAYER_PACKET_ID_POSITION_VELOCITY);
MultiPlayerPacketParser::writeSize(positionMessage, positionVelocity.size());
positionVelocity.packet_index = m_packetIndex;
MultiPlayerPacketParser::writeType(positionMessage, CFs9Sdk::MULTIPLAYER_PACKET_ID_POSITION_SLEWMODE);
MultiPlayerPacketParser::writeSize(positionMessage, positionSlewMode.size());
positionSlewMode.packet_index = m_packetIndex;
++m_packetIndex;
positionMessage = MultiPlayerPacketParser::writeMessage(positionMessage, positionVelocity);
positionMessage = MultiPlayerPacketParser::writeMessage(positionMessage, positionSlewMode);
sendMessage(positionMessage);