mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
fix: Don't use controller info from datafile on non-VATSIM servers
Fixes #280
This commit is contained in:
@@ -672,8 +672,14 @@ namespace BlackCore
|
|||||||
const CAtcStationList stationsWithCallsign = m_atcStationsOnline.findByCallsign(callsign);
|
const CAtcStationList stationsWithCallsign = m_atcStationsOnline.findByCallsign(callsign);
|
||||||
if (stationsWithCallsign.isEmpty())
|
if (stationsWithCallsign.isEmpty())
|
||||||
{
|
{
|
||||||
// new station, init with data from data file
|
CAtcStation station;
|
||||||
CAtcStation station(sApp->getWebDataServices()->getAtcStationsForCallsign(callsign).frontOrDefault());
|
|
||||||
|
// if connected to VATSIM, init with data from data file
|
||||||
|
if (this->getConnectedServer().getEcosystem() == CEcosystem::vatsim())
|
||||||
|
{
|
||||||
|
station = sApp->getWebDataServices()->getAtcStationsForCallsign(callsign).frontOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
station.setCallsign(callsign);
|
station.setCallsign(callsign);
|
||||||
station.setRange(range);
|
station.setRange(range);
|
||||||
station.setFrequency(frequency);
|
station.setFrequency(frequency);
|
||||||
|
|||||||
Reference in New Issue
Block a user