mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Ref T180, check result of removing aircraft
This commit is contained in:
@@ -908,11 +908,16 @@ namespace BlackSimPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
simObject.setPendingRemoved(true);
|
simObject.setPendingRemoved(true);
|
||||||
|
m_hints.remove(simObject.getCallsign());
|
||||||
if (this->showDebugLogMessage()) { this->debugLogMessage(Q_FUNC_INFO, QString("Cs: '%1' request/object id: %2/%3").arg(callsign.toQString()).arg(simObject.getRequestId()).arg(simObject.getObjectId())); }
|
if (this->showDebugLogMessage()) { this->debugLogMessage(Q_FUNC_INFO, QString("Cs: '%1' request/object id: %2/%3").arg(callsign.toQString()).arg(simObject.getRequestId()).arg(simObject.getObjectId())); }
|
||||||
|
|
||||||
// call in SIM
|
// call in SIM
|
||||||
const SIMCONNECT_DATA_REQUEST_ID requestId = this->obtainRequestIdForSimData();
|
const SIMCONNECT_DATA_REQUEST_ID requestId = this->obtainRequestIdForSimData();
|
||||||
m_hints.remove(simObject.getCallsign());
|
const HRESULT result = SimConnect_AIRemoveObject(m_hSimConnect, static_cast<SIMCONNECT_OBJECT_ID>(simObject.getObjectId()), requestId);
|
||||||
|
if (result != S_OK)
|
||||||
|
{
|
||||||
|
CLogMessage(this).warning("Removing aircraft '%1' from simulator failed") << callsign.asString();
|
||||||
|
}
|
||||||
|
|
||||||
// mark in provider
|
// mark in provider
|
||||||
const bool updated = this->updateAircraftRendered(callsign, false);
|
const bool updated = this->updateAircraftRendered(callsign, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user