]> git.mxchange.org Git - flightgear.git/blobdiff - src/MultiPlayer/multiplaytxmgr.cxx
Frederic: MSVC doesn't have stdint.h. I just copied the code found in net_gui.hxx...
[flightgear.git] / src / MultiPlayer / multiplaytxmgr.cxx
index ad0413860837300170dbbb4fe91c8118fec4f345..12570ffc77663a6739ca961f7338127ecccac8be 100644 (file)
@@ -64,7 +64,7 @@ const char sMULTIPLAYTXMGR_HID[] = MULTIPLAYTXMGR_HID;
 ******************************************************************/
 FGMultiplayTxMgr::FGMultiplayTxMgr() {
 
-    int iPlayerCnt;         // Count of players in player array
+    // int iPlayerCnt;         // Count of players in player array
 
     // Initialise private members
     m_bInitialised = false;
@@ -189,14 +189,15 @@ void FGMultiplayTxMgr::Close(void) {
 * Name: SendMyPosition
 * Description: Sends the position data for the local position.
 ******************************************************************/
-void FGMultiplayTxMgr::SendMyPosition(const sgMat4 PlayerPosMat4) {
+void FGMultiplayTxMgr::SendMyPosition(const sgQuat PlayerOrientation,
+                                      const sgdVec3 PlayerPosition) {
 
     T_MsgHdr MsgHdr;
     T_PositionMsg PosMsg;
     char sMsg[sizeof(T_MsgHdr) + sizeof(T_PositionMsg)];
 
     if (m_bInitialised) {
-        mLocalPlayer->SetPosition(PlayerPosMat4);
+        mLocalPlayer->SetPosition(PlayerOrientation, PlayerPosition);
         mLocalPlayer->FillPosMsg(&MsgHdr, &PosMsg);
         memcpy(sMsg, &MsgHdr, sizeof(T_MsgHdr));
         memcpy(sMsg + sizeof(T_MsgHdr), &PosMsg, sizeof(T_PositionMsg));
@@ -216,10 +217,10 @@ void FGMultiplayTxMgr::SendMyPosition(const sgMat4 PlayerPosMat4) {
 ******************************************************************/
 void FGMultiplayTxMgr::SendTextMessage(const string &sMsgText) const {
 
-    bool bResult = false;
+    // bool bResult = false;
     T_MsgHdr MsgHdr;
     T_ChatMsg ChatMsg;
-    int iNextBlockPosition = 0;
+    unsigned int iNextBlockPosition = 0;
     char sMsg[sizeof(T_MsgHdr) + sizeof(T_ChatMsg)];
 
     if (m_bInitialised) {