]> git.mxchange.org Git - flightgear.git/blobdiff - src/MultiPlayer/mpplayer.cxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / MultiPlayer / mpplayer.cxx
index d40abec4693e91765208fdcb7dcf6a9559619d18..a57103f2940c1fade755588fab0752596a6d3add 100644 (file)
 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef FG_MPLAYER_AS
 
 /******************************************************************
 * $Id$
@@ -38,7 +43,7 @@
 #include "mpplayer.hxx"
 
 #include <stdlib.h>
-#ifndef _MSC_VER
+#if !(defined(_MSC_VER) || defined(__MINGW32__))
 # include <netdb.h>
 # include <sys/socket.h>
 # include <netinet/in.h>
@@ -47,8 +52,9 @@
 #include <plib/netSocket.h>
 #include <plib/sg.h>
 
+#include <simgear/scene/model/loader.hxx>
+
 #include <Main/globals.hxx>
-#include <Model/loader.hxx>
 #include <Scenery/scenery.hxx>
 
 
@@ -241,7 +247,10 @@ void MPPlayer::LoadModel(void) {
     m_ModelTrans = new ssgTransform;
 
     // Load the model
-    m_Model = globals->get_model_loader()->load_model(m_sModelName);
+    m_Model = globals->get_model_loader()->load_model( globals->get_fg_root(),
+                                                       m_sModelName,
+                                                       globals->get_props(),
+                                                       globals->get_sim_time_sec() );
     m_Model->clrTraversalMaskBits( SSGTRAV_HOT );
 
     // Add model to transform
@@ -307,3 +316,5 @@ void MPPlayer::FillMsgHdr(T_MsgHdr *MsgHdr, const int iMsgId) {
 
 }
 
+#endif // FG_MPLAYER_AS
+