Ref T659, signature so changed livery/modelstring can be set, and/or not send at all

This commit is contained in:
Klaus Basan
2019-07-22 01:37:35 +02:00
committed by Mat Sutcliffe
parent 184e776c8b
commit 2fb207c028
6 changed files with 19 additions and 7 deletions

View File

@@ -211,7 +211,7 @@ namespace BlackCore
if (m_airspace) { m_airspace->gracefulShutdown(); }
}
CStatusMessage CContextNetwork::connectToNetwork(const CServer &server, INetwork::LoginMode mode)
CStatusMessage CContextNetwork::connectToNetwork(const CServer &server, const QString &extraLiveryString, bool sendLivery, const QString &extraModelString, bool sendModelString, INetwork::LoginMode mode)
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
QString msg;
@@ -233,10 +233,14 @@ namespace BlackCore
mode = INetwork::LoginAsObserver;
}
const QString l = extraLiveryString.isEmpty() ? ownAircraft.getModel().getSwiftLiveryString() : extraLiveryString;
const QString m = extraModelString.isEmpty() ? ownAircraft.getModelString() : extraModelString;
m_currentMode = mode;
m_network->presetLoginMode(mode);
m_network->presetCallsign(ownAircraft.getCallsign());
m_network->presetIcaoCodes(ownAircraft);
m_network->presetLiveryAndModelString(l, sendLivery, m, sendModelString);
const CSimulatorPluginInfo sim = this->getIContextSimulator() ? this->getIContextSimulator()->getSimulatorPluginInfo() : CSimulatorPluginInfo();
m_network->presetSimulatorInfo(sim);