refs #262, fix update of aircraft position

Described here (3): https://dev.vatsim-germany.org/boards/22/topics/1792?r=1801#message-1801

* Also renamed: setOwnAircraftAvionics -> setOwnCockpit to be consistent
* Removed outdated methods
This commit is contained in:
Klaus Basan
2014-06-09 01:33:19 +02:00
parent 8c792a61e3
commit dac556c6e9
18 changed files with 156 additions and 164 deletions

View File

@@ -472,6 +472,11 @@ namespace BlackCore
c = this->connect(this->m_contextNetwork, &IContextNetwork::changedAtcStationOnlineConnectionStatus,
this->getCContextOwnAircraft(), &CContextOwnAircraft::changedAtcStationOnlineConnectionStatus);
Q_ASSERT(c);
// inject updated own aircraft to network
c = this->connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraft,
this->getCContextNetwork(), &CContextNetwork::psChangedOwnAircraft);
Q_ASSERT(c);
}
}
@@ -647,6 +652,20 @@ namespace BlackCore
return static_cast<CContextApplication *>(this->m_contextApplication);
}
CContextNetwork *CRuntime::getCContextNetwork()
{
Q_ASSERT_X(!this->m_contextApplication || this->m_contextNetwork->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");
return static_cast<CContextNetwork *>(this->m_contextNetwork);
}
const CContextNetwork *CRuntime::getCContextNetwork() const
{
Q_ASSERT_X(!this->m_contextApplication || this->m_contextNetwork->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");
return static_cast<CContextNetwork *>(this->m_contextNetwork);
}
CContextOwnAircraft *CRuntime::getCContextOwnAircraft()
{
Q_ASSERT_X(!this->m_contextOwnAircraft || this->m_contextOwnAircraft->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");