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:
Roland Winklmeier
2016-07-14 15:58:00 +02:00
parent 3aee6174ac
commit c92a8ea32c
4 changed files with 37 additions and 54 deletions

View File

@@ -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