mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Refactor CContextSimulator::loadSimulatorPlugin
When a plugin is loaded, existing aircrafts should not be added immediatly, but as soon as the simulator is simulating. CContextSimulator also handles now the case that no simulator is attached and all aircraft slots are now doing nothing instead of raising an assert. refs #549
This commit is contained in:
@@ -59,5 +59,12 @@ namespace BlackCore
|
||||
{
|
||||
return static_cast<ISimulator::SimulatorStatus>(this->getSimulatorStatus());
|
||||
}
|
||||
|
||||
bool IContextSimulator::isSimulatorSimulating() const
|
||||
{
|
||||
if (!isSimulatorAvailable() || !getSimulatorStatusEnum().testFlag(ISimulator::Simulating)) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user