更新 'src/MultiPlayer/multiplaymgr.cxx'

This commit is contained in:
zhongjin 2022-11-07 14:11:38 +08:00
parent ff6d706dfe
commit 6009cc455f

View File

@ -1446,10 +1446,11 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo)
PosMsg->jwhtext[1] = XDR_encode_float (pitch); PosMsg->jwhtext[1] = XDR_encode_float (pitch);
PosMsg->jwhtext[2] = XDR_encode_float (roll); PosMsg->jwhtext[2] = XDR_encode_float (roll);
SGPropertyNode* n = fgGetNode("/sim/instrumentation/gps/indicated-ground-speed-kt"); SGPropertyNode* n = fgGetNode("/sim/instrumentation/gps/indicated-ground-speed-kt",false);
float speed = n->getDoubleValue(speed); float speed = n->getDoubleValue();
PosMsg->jwhtext[3] = XDR_encode_float (speed); PosMsg->jwhtext[3] = XDR_encode_float (speed);
/*
n = fgGetNode("/sim/instrumentation/gps/indicated-vertical-speed"); n = fgGetNode("/sim/instrumentation/gps/indicated-vertical-speed");
n = fgGetNode("/sim/instrumentation/airspeed-indicator/indicated-speed-kt"); //指示空速 n = fgGetNode("/sim/instrumentation/airspeed-indicator/indicated-speed-kt"); //指示空速
@ -1470,7 +1471,7 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo)
//n = fgGetNode(""); //n = fgGetNode("");
*/
} }
xdr_data_t* ptr = msgBuf.properties(); xdr_data_t* ptr = msgBuf.properties();