mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #825, do not render aircraft without callsign
(those are likely already gone: logoff, crash)
This commit is contained in:
@@ -614,7 +614,7 @@ namespace BlackCore
|
|||||||
if (!this->isConnected()) { return; }
|
if (!this->isConnected()) { return; }
|
||||||
|
|
||||||
const CSimulatedAircraft remoteAircraft = this->getAircraftInRangeForCallsign(callsign);
|
const CSimulatedAircraft remoteAircraft = this->getAircraftInRangeForCallsign(callsign);
|
||||||
bool complete = remoteAircraft.getModel().hasModelString() || remoteAircraft.getModel().getModelType() == CAircraftModel::TypeFSInnData;
|
const bool complete = (remoteAircraft.hasValidCallsign() && remoteAircraft.getModel().hasModelString()) || (remoteAircraft.getModel().getModelType() == CAircraftModel::TypeFSInnData);
|
||||||
|
|
||||||
if (trial < 2 && !complete)
|
if (trial < 2 && !complete)
|
||||||
{
|
{
|
||||||
@@ -627,13 +627,17 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// some checks for special conditions, e.g. logout -> empty list, but still signals pending
|
// some checks for special conditions, e.g. logout -> empty list, but still signals pending
|
||||||
emit this->readyForModelMatching(remoteAircraft);
|
if (this->isConnected() && remoteAircraft.hasValidCallsign())
|
||||||
|
|
||||||
// log message for matching
|
|
||||||
{
|
{
|
||||||
const QString msg = QString("Ready for matching '%1' with model type '%2'").arg(callsign.toQString()).arg(remoteAircraft.getModel().getModelTypeAsString());
|
const QString msg = QString("Ready for matching '%1' with model type '%2'").arg(callsign.toQString(), remoteAircraft.getModel().getModelTypeAsString());
|
||||||
const CStatusMessage m = CMatchingUtils::logMessage(callsign, msg, getLogCategories());
|
const CStatusMessage m = CMatchingUtils::logMessage(callsign, msg, getLogCategories());
|
||||||
this->addReverseLookupMessage(callsign, m);
|
this->addReverseLookupMessage(callsign, m);
|
||||||
|
emit this->readyForModelMatching(remoteAircraft);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const CStatusMessage m = CMatchingUtils::logMessage(callsign, "Ignoring this aircraft, not found in range list", getLogCategories());
|
||||||
|
this->addReverseLookupMessage(callsign, m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user