mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
[FSD] Don't use CCallsign object to send incremental parts update to special receiver
A client query can be sent to any type of receiver, not only to valid callsigns. For example also to "@94835". This fixes the corrupted receiver for incremental aircraft parts.
This commit is contained in:
committed by
Mat Sutcliffe
parent
0e9297ff5f
commit
0b8db1a612
@@ -623,7 +623,9 @@ namespace BlackCore
|
||||
|
||||
void CFSDClient::sendAircraftConfiguration(const QString &receiver, const QString &aircraftConfigJson)
|
||||
{
|
||||
sendClientQuery(ClientQueryType::AircraftConfig, receiver, { aircraftConfigJson });
|
||||
if (aircraftConfigJson.size() == 0) { return; }
|
||||
const ClientQuery clientQuery(m_ownCallsign.asString(), receiver, ClientQueryType::AircraftConfig, { aircraftConfigJson });
|
||||
sendMessage(clientQuery);
|
||||
}
|
||||
|
||||
void CFSDClient::sendFsdMessage(const QString &message)
|
||||
@@ -766,8 +768,7 @@ namespace BlackCore
|
||||
|
||||
void CFSDClient::sendIncrementalAircraftConfig()
|
||||
{
|
||||
if (!this->isConnected()) { return; }
|
||||
if (!this->getSetupForServer().sendAircraftParts()) { return; }
|
||||
if (!m_unitTestMode && (!this->isConnected() || !this->getSetupForServer().sendAircraftParts())) { return; }
|
||||
const CAircraftParts currentParts(this->getOwnAircraftParts());
|
||||
|
||||
// If it hasn't changed, return
|
||||
|
||||
Reference in New Issue
Block a user