refs #172, refs #227 bringing it all together custom packages and client object updates

This commit is contained in:
Klaus Basan
2014-05-06 13:56:34 +02:00
parent 57b3a0bcb8
commit 29ab922937

View File

@@ -45,14 +45,23 @@ namespace BlackCore
aircraft.setTransponder(transponder);
aircraft.calculcateDistanceToPlane(this->m_ownAircraft.getPosition());
this->m_vatsimDataFileReader->getAircrafts().updateFromVatsimDataFileAircraft(aircraft);
this->m_aircraftsInRange.push_back(aircraft);
// and new client, there is a chance it has been created by
// custom package first
if (!this->m_otherClients.contains(&CClient::getCallsign, callsign))
this->m_otherClients.push_back(CClient(callsign)); // initial, will be filled by data later
if (this->isConnected())
{
// only emit if still connected
emit this->m_network->sendFrequencyQuery(callsign);
emit this->m_network->sendRealNameQuery(callsign);
emit this->m_network->sendIcaoCodesQuery(callsign);
// only if still connected
this->m_network->sendFrequencyQuery(callsign);
this->m_network->sendRealNameQuery(callsign);
this->m_network->sendIcaoCodesQuery(callsign);
this->m_network->sendCapabilitiesQuery(callsign);
this->m_network->sendServerQuery(callsign);
this->sendFsipirCustomPackage(callsign);
}
}
else