From df84113df66a0ac25868cd40babfe393436ae282 Mon Sep 17 00:00:00 2001 From: zhongjin Date: Mon, 7 Nov 2022 17:32:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/MultiPlayer/multiplay?= =?UTF-8?q?mgr.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MultiPlayer/multiplaymgr.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index c9c8a8e..b46bd47 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -1438,7 +1438,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) //zhongjin - std::string mAirportid = fgGetString("/instrumentation/comm/airport-id"); + std::string mAirportid = fgGetString("/sim/airport/nearest-tower-ident"); //塔台 strncpy(PosMsg->airport, mAirportid.c_str(), 4); //PosMsg->airport[4 - 1] = '\0'; @@ -1479,6 +1479,10 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo) xxx = fgGetDouble("/instrumentation/transponder/id-code",true); PosMsg->jwhtext[11] = XDR_encode_float (xxx); + xxx = fgGetDouble("/position/altitude-agl-m",true); + PosMsg->jwhtext[11] = XDR_encode_float (xxx); + + //n = fgGetNode(""); }