]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/multiplay.cxx
Expose the "play-audio-command" through the props/telnet interface.
[flightgear.git] / src / Network / multiplay.cxx
index 54bd41da000288fb902d2dbdab6fca0be7221d6a..ebf511f88554db75b784ee74f36c64724d42efa8 100644 (file)
@@ -20,6 +20,9 @@
 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
 
 #include <simgear/compiler.h>
 
@@ -29,6 +32,7 @@
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/scene/model/placement.hxx>
+#include <simgear/scene/model/placementtrans.hxx>
 
 #include <Scenery/scenery.hxx>
 
@@ -103,12 +107,12 @@ bool FGMultiplay::process() {
 
   if (get_direction() == SG_IO_IN) {
 
-    globals->get_multiplayer_rx_mgr()->ProcessData();
+    globals->get_multiplayer_mgr()->ProcessData();
 
   } else if (get_direction() == SG_IO_OUT) {
 
     sgMat4 posTrans;
-    sgCopyMat4(posTrans, globals->get_aircraft_model()->get3DModel()->get_POS());
+    globals->get_aircraft_model()->get3DModel()->getTransform()->getTransform(posTrans);
     Point3D center = globals->get_scenery()->get_center();
     sgdVec3 PlayerPosition;
     sgdSetVec3(PlayerPosition, posTrans[3][0] + center[0],
@@ -116,7 +120,7 @@ bool FGMultiplay::process() {
     sgQuat PlayerOrientation;
     sgMatrixToQuat(PlayerOrientation, posTrans);
 
-    globals->get_multiplayer_tx_mgr()->SendMyPosition(PlayerOrientation, PlayerPosition);
+    globals->get_multiplayer_mgr()->SendMyPosition(PlayerOrientation, PlayerPosition);
 
   }
 
@@ -133,11 +137,11 @@ bool FGMultiplay::close() {
 
   if (get_direction() == SG_IO_IN) {
 
-    globals->get_multiplayer_rx_mgr()->Close();
+    globals->get_multiplayer_mgr()->Close();
 
   } else if (get_direction() == SG_IO_OUT) {
 
-    globals->get_multiplayer_tx_mgr()->Close();
+//    globals->get_multiplayer_mgr()->Close();
 
   }