refs #246, own context for aircraft

This commit is contained in:
Klaus Basan
2014-05-28 01:47:20 +02:00
parent a4811c619c
commit 1166bcd053
6 changed files with 181 additions and 43 deletions

View File

@@ -433,7 +433,7 @@ namespace BlackCore
if (this->m_contextSimulator && this->m_contextSimulator->usingLocalObjects() && this->m_contextNetwork)
{
// only connect if simulator running locally, no roundtrips
// only connect if simulator running locally, no round trips
if (this->getCContextSimulator()->m_simulator)
{
c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation,
@@ -441,6 +441,14 @@ namespace BlackCore
Q_ASSERT(c);
}
}
if (this->m_contextNetwork && this->m_contextOwnAircraft && this->m_contextNetwork->usingLocalObjects() && this->m_contextOwnAircraft->usingLocalObjects())
{
// only where network and(!) own aircraft run locally
c = this->connect(this->m_contextNetwork, &IContextNetwork::changedAtcStationOnlineConnectionStatus,
this->getCContextOwnAircraft(), &CContextOwnAircraft::changedAtcStationOnlineConnectionStatus);
Q_ASSERT(c);
}
}
void CRuntime::gracefulShutdown()