]> git.mxchange.org Git - flightgear.git/blobdiff - src/MultiPlayer/multiplaymgr.cxx
Don't restore initial screen geometry because there is nothing in fg_os* to resize...
[flightgear.git] / src / MultiPlayer / multiplaymgr.cxx
index ec1ecb820bb682586969ffb54dc5b41e576ad8e3..b87662b4332450b66e59f0cb0f8f736fe4eeee4d 100644 (file)
@@ -21,7 +21,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 //  
@@ -104,6 +104,19 @@ FGMultiplayMgr::sIdPropertyList[] = {
   {391, "engines/engine[9]/n2"},
   {392, "engines/engine[9]/rpm"},
 
+  {800, "rotors/main/rpm"},
+  {801, "rotors/tail/rpm"},
+  {810, "rotors/main/blade1_pos"},
+  {811, "rotors/main/blade2_pos"},
+  {812, "rotors/main/blade3_pos"},
+  {813, "rotors/main/blade4_pos"},
+  {820, "rotors/main/blade1_flap"},
+  {821, "rotors/main/blade2_flap"},
+  {822, "rotors/main/blade3_flap"},
+  {823, "rotors/main/blade4_flap"},
+  {830, "rotors/tail/blade1_pos"},
+  {831, "rotors/tail/blade2_pos"},
+
   {1001, "controls/flight/slats"},
   {1002, "controls/flight/speedbrake"},
   {1003, "controls/flight/spoilers"},
@@ -351,7 +364,7 @@ FGMultiplayMgr::Update(void)
     //  no Data received
     //////////////////////////////////////////////////
     if (bytes <= 0) {
-      if (errno != EAGAIN)
+      if (errno != EAGAIN && errno != 0) // MSVC output "NoError" otherwise
         perror("FGMultiplayMgr::MP_ProcessData");
       break;
     }
@@ -484,7 +497,7 @@ FGMultiplayMgr::ProcessChatMsg(const char *Msg, netAddress& SenderAddress)
     return;
   }
   
-  char MsgBuf[MsgHdr->MsgLen - sizeof(T_MsgHdr)];
+  char *MsgBuf = new char[MsgHdr->MsgLen - sizeof(T_MsgHdr)];
   strncpy(MsgBuf, ((T_ChatMsg *)(Msg + sizeof(T_MsgHdr)))->Text,
           MsgHdr->MsgLen - sizeof(T_MsgHdr));
   MsgBuf[MsgHdr->MsgLen - sizeof(T_MsgHdr) - 1] = '\0';
@@ -492,6 +505,7 @@ FGMultiplayMgr::ProcessChatMsg(const char *Msg, netAddress& SenderAddress)
   T_ChatMsg* ChatMsg = (T_ChatMsg *)(Msg + sizeof(T_MsgHdr));
   SG_LOG ( SG_NETWORK, SG_ALERT, "Chat [" << MsgHdr->Callsign << "]"
            << " " << MsgBuf << endl);
+  delete [] MsgBuf;
 } // FGMultiplayMgr::ProcessChatMsg ()
 //////////////////////////////////////////////////////////////////////