mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
committed by
Klaus Basan
parent
9bc0226fd1
commit
83776c5cc9
@@ -62,7 +62,8 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
//! \brief SimConnect request ID's
|
//! \brief SimConnect request ID's
|
||||||
enum Requests {
|
enum Requests {
|
||||||
RequestOwnAircraft = 1000
|
RequestOwnAircraft = 1000,
|
||||||
|
RequestRemoveAircraft = 2000
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \brief Constructor
|
//! \brief Constructor
|
||||||
|
|||||||
@@ -162,9 +162,9 @@ namespace BlackSimPlugin
|
|||||||
m_simConnectObjects.insert(callsign, simObj);
|
m_simConnectObjects.insert(callsign, simObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorFsx::removeRemoteAircraft(const CCallsign &/*callsign*/)
|
void CSimulatorFsx::removeRemoteAircraft(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
// TODO
|
removeRemoteAircraft(m_simConnectObjects.value(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
CSimulatorInfo CSimulatorFsx::getSimulatorInfo() const
|
CSimulatorInfo CSimulatorFsx::getSimulatorInfo() const
|
||||||
@@ -356,7 +356,12 @@ namespace BlackSimPlugin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
emit statusChanged(ConnectionFailed);
|
emit statusChanged(ConnectionFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimulatorFsx::removeRemoteAircraft(const CSimConnectObject &simObject)
|
||||||
|
{
|
||||||
|
SimConnect_AIRemoveObject(m_hSimConnect, simObject.getObjectId(), simObject.getRequestId());
|
||||||
|
m_simConnectObjects.remove(simObject.getCallsign());
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CSimulatorFsx::initSystemEvents()
|
HRESULT CSimulatorFsx::initSystemEvents()
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
void removeRemoteAircraft(const CSimConnectObject &simObject);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize SimConnect system events
|
* \brief Initialize SimConnect system events
|
||||||
|
|||||||
Reference in New Issue
Block a user