mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Ref T189 and review follow up, replacing the changed values seems to be 4x faster
(tested in samples)
This commit is contained in:
@@ -759,17 +759,15 @@ namespace BlackCore
|
||||
void CNetworkVatlib::sendCustomFsinnReponse(const CCallsign &callsign)
|
||||
{
|
||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||
const CSimulatedAircraft myAircraft(getOwnAircraft());
|
||||
QString modelString = myAircraft.getModel().getModelString();
|
||||
if (modelString.isEmpty()) { modelString = defaultModelString(); }
|
||||
|
||||
const QStringList data { { "0" },
|
||||
myAircraft.getAirlineIcaoCodeDesignator(),
|
||||
myAircraft.getAircraftIcaoCodeDesignator(),
|
||||
{ "" }, { "" }, { "" }, { "" },
|
||||
myAircraft.getAircraftIcaoCombinedType(),
|
||||
modelString
|
||||
};
|
||||
static const QStringList dataTemplate{ "0", "", "", "", "", "", "", "", "" };
|
||||
const CSimulatedAircraft myAircraft(getOwnAircraft());
|
||||
|
||||
QStringList data(dataTemplate);
|
||||
data[1] = myAircraft.getAirlineIcaoCodeDesignator();
|
||||
data[2] = myAircraft.getAircraftIcaoCodeDesignator();
|
||||
data[7] = myAircraft.getAircraftIcaoCombinedType();
|
||||
data[8] = myAircraft.hasModelString() ? myAircraft.getModel().getModelString() : defaultModelString();
|
||||
sendCustomPacket(callsign, "FSIPI", data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user