refs #789, support for aircraft out of FSX reality bubble

* such aircraft will be tried to be added again
* removed qeueud adding as it was not solving the problem
This commit is contained in:
Klaus Basan
2016-11-11 01:08:20 +01:00
parent 356e91c22f
commit 42549760ed
5 changed files with 110 additions and 88 deletions

View File

@@ -435,23 +435,6 @@ namespace BlackCore
Q_UNUSED(callsign);
}
void CSimulatorCommon::ps_queueForAdding(const CSimulatedAircraft &aircraft)
{
m_pendingAircraftToAdd.replaceOrAddByCallsign(aircraft);
QTimer::singleShot(500, this, [ = ]
{
this->physicallyAddNextQueuedAircraft();
});
}
void CSimulatorCommon::physicallyAddNextQueuedAircraft()
{
if (m_pendingAircraftToAdd.isEmpty()) { return; } // delete in meantime
CSimulatedAircraft nextAircraft(m_pendingAircraftToAdd.front()); // normally it should always find a value
m_pendingAircraftToAdd.pop_front();
this->physicallyAddRemoteAircraft(nextAircraft);
}
void CSimulatorCommon::reset()
{
m_statsUpdateAircraftCountMs = 0;
@@ -463,7 +446,6 @@ namespace BlackCore
void CSimulatorCommon::clearAllAircraft()
{
m_aircraftToAddAgainWhenRemoved.clear();
m_pendingAircraftToAdd.clear();
}
} // namespace