refs #395, changed own aircraft provider to thread safe member functions

(similar to remote aircraft provider)
* removed references
* made own aircraft context thread safe (reg. own aircrat data)
* removed the read only versions of the provider
* adjusted consuming methods
* renamed some functions ("ownAircraft...") to avoid ambiguity (with remote aircraft)
This commit is contained in:
Klaus Basan
2015-04-26 16:41:48 +02:00
committed by Mathew Sutcliffe
parent 7200f2e29c
commit 3ecf37dda4
27 changed files with 505 additions and 335 deletions

View File

@@ -215,7 +215,7 @@ namespace BlackSimPlugin
{
if (m_useFsuipc && m_fsuipc)
{
CSimulatedAircraft fsuipcAircraft(ownAircraft());
CSimulatedAircraft fsuipcAircraft(getOwnAircraft());
bool ok = m_fsuipc->read(fsuipcAircraft, true, true, true);
if (ok)
{
@@ -244,7 +244,7 @@ namespace BlackSimPlugin
{
MPPositionVelocity mpPositionVelocity;
MultiPlayerPacketParser::readMessage(message, mpPositionVelocity);
ownAircraft().setSituation(aircraftSituationfromFS9(mpPositionVelocity));
updateOwnSituation(aircraftSituationfromFS9(mpPositionVelocity));
break;
}
case CFs9Sdk::MPCHAT_PACKET_ID_CHAT_TEXT_SEND:
@@ -261,7 +261,7 @@ namespace BlackSimPlugin
void CSimulatorFs9::updateOwnAircraftFromSimulator(const CAircraft &simDataOwnAircraft)
{
this->providerUpdateCockpit(
this->updateCockpit(
simDataOwnAircraft.getCom1System(),
simDataOwnAircraft.getCom2System(),
simDataOwnAircraft.getTransponder(),