]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/multiplay.hxx
Update Mac configure script for new ALUT scheme; support --with-alut-framework.
[flightgear.git] / src / Network / multiplay.hxx
index a36cd38272e25479b4279914754f1ade93c17f39..0d5563c0e03669236878ecb5b82076c71ede0ca7 100644 (file)
@@ -19,7 +19,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.
 //
 
 #ifndef _FG_MULTIPLAY_HXX
@@ -29,9 +29,9 @@
 
 #include <simgear/compiler.h>
 
-#include STL_STRING
+#include <string>
 
-#include <simgear/scene/model/model.hxx>
+#include <simgear/props/props.hxx>
 
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
@@ -40,7 +40,7 @@
 
 #include "protocol.hxx"
 
-SG_USING_STD(string);
+using std::string;
 
 
 /****************************************************************
@@ -58,8 +58,6 @@ SG_USING_STD(string);
 *
 ******************************************************************/
 
-#include <simgear/props/props.hxx>
-
 class FGMultiplay : public FGProtocol {
 public:
 
@@ -72,39 +70,20 @@ public:
     /** Enables the FGMultiplay object. */
     bool open();
 
-    /** Tells the multiplayer_mgr to send/receive data. */
+    /** Tells the multiplayer_mgr to send/receive data.
+    */
     bool process();
 
-    /** Closes the multiplayer_mgr. */
+    /** Closes the multiplayer_mgr.
+    */
     bool close();
 
-    
 private:
-    struct _node_cache {
-        double val;
-        SGPropertyNode_ptr node;
-        _node_cache(double v, SGPropertyNode_ptr n) {
-           val = v; node = n;
-        };
-    };
-
-    /** calculate accelerations
-    */
-    void calcAcc(double speedN, double speedE, double speedD);
-
-    double last_time ;                                //sec
-    double last_speedN, last_speedE, last_speedD;     //fps
-    double calcaccN, calcaccE, calcaccD;              //fps2
-
-    SGPropertyNode *lat_n, *lon_n, *alt_n;
-    SGPropertyNode *heading_n, *pitch_n, *roll_n;
-    SGPropertyNode *speedN_n, *speedE_n, *speedD_n;
-    SGPropertyNode *left_aileron_n, *right_aileron_n;
-    SGPropertyNode *elevator_n, *rudder_n;
-    // SGPropertyNode *rpms[5];
-    SGPropertyNode *rateH_n, *rateR_n, *rateP_n;
-
-    map<string,struct _node_cache*> props;
-    map<string,struct _node_cache*>::iterator propit;
+  // Map between the property id's from the multiplayers network packets
+  // and the property nodes
+  typedef std::map<unsigned, SGSharedPtr<SGPropertyNode> > PropertyMap;
+  PropertyMap mPropertyMap;
 };
+
+
 #endif // _FG_MULTIPLAY_HXX