mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:17:20 +08:00
refs #395, prepared for logical / physical add/remote member functions
* renamed functions * added access to snapshot * moved simulator base class in own files (.h/.cpp)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
91f0b99cc5
commit
e9f7810efc
@@ -26,8 +26,8 @@ namespace BlackSimPlugin
|
||||
namespace FsCommon
|
||||
{
|
||||
CSimulatorFsCommon::CSimulatorFsCommon(
|
||||
const BlackMisc::Simulation::CSimulatorPluginInfo &info,
|
||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||
const CSimulatorPluginInfo &info,
|
||||
IOwnAircraftProvider *ownAircraftProvider,
|
||||
IRemoteAircraftProvider *renderedAircraftProvider,
|
||||
QObject *parent) :
|
||||
CSimulatorCommon(info, ownAircraftProvider, renderedAircraftProvider, parent),
|
||||
@@ -100,7 +100,8 @@ namespace BlackSimPlugin
|
||||
{
|
||||
// reverse lookup of ICAO
|
||||
CAircraftIcao icao = mapperInstance()->getIcaoForModelString(model.getModelString());
|
||||
icao.updateMissingParts(icao);
|
||||
icao.updateMissingParts(model.getIcao());
|
||||
model.setIcao(icao); // now best ICAO info in model
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +260,7 @@ namespace BlackSimPlugin
|
||||
if (originator == simulatorOriginator()) { return false; }
|
||||
|
||||
// remove upfront, and then enable / disable again
|
||||
this->removeRemoteAircraft(aircraft.getCallsign());
|
||||
this->physicallyRemoveRemoteAircraft(aircraft.getCallsign());
|
||||
return this->changeRemoteAircraftEnabled(aircraft, originator);
|
||||
}
|
||||
|
||||
@@ -268,11 +269,11 @@ namespace BlackSimPlugin
|
||||
if (originator == simulatorOriginator()) { return false; }
|
||||
if (aircraft.isEnabled())
|
||||
{
|
||||
this->addRemoteAircraft(aircraft);
|
||||
this->physicallyAddRemoteAircraft(aircraft);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->removeRemoteAircraft(aircraft.getCallsign());
|
||||
this->physicallyRemoveRemoteAircraft(aircraft.getCallsign());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user