更新 'src/MultiPlayer/multiplaymgr.cxx'

This commit is contained in:
zhongjin 2022-11-07 17:32:16 +08:00
parent 755fcc303f
commit df84113df6

View File

@ -1438,7 +1438,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo)
//zhongjin //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); strncpy(PosMsg->airport, mAirportid.c_str(), 4);
//PosMsg->airport[4 - 1] = '\0'; //PosMsg->airport[4 - 1] = '\0';
@ -1479,6 +1479,10 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo)
xxx = fgGetDouble("/instrumentation/transponder/id-code",true); xxx = fgGetDouble("/instrumentation/transponder/id-code",true);
PosMsg->jwhtext[11] = XDR_encode_float (xxx); PosMsg->jwhtext[11] = XDR_encode_float (xxx);
xxx = fgGetDouble("/position/altitude-agl-m",true);
PosMsg->jwhtext[11] = XDR_encode_float (xxx);
//n = fgGetNode(""); //n = fgGetNode("");
} }