]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Multiplayer client/server system -- Fix building MPS enabled binary
[flightgear.git] / src / Main / fg_props.cxx
index 654a1967566442fe737979e51caf29bcc9486e0a..22b1d0901522ccbfcdcbd4257dc45231ffd8ae58 100644 (file)
 #  include <simgear/compiler.h>
 #endif
 
-#include <simgear/misc/exception.hxx>
+#include <simgear/structure/exception.hxx>
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/scene/material/matlib.hxx>
+#include <simgear/sound/soundmgr.hxx>
 
 #include STL_IOSTREAM
 
 #else
 #  include <Environment/environment.hxx>
 #endif // FG_WEATHERCM
-#include <Objects/matlib.hxx>
 
 #include <GUI/gui.h>
-#include <Sound/soundmgr.hxx>
 
 #include "globals.hxx"
-#include "fgfs.hxx"
 #include "fg_props.hxx"
 
 SG_USING_STD(istream);
@@ -234,7 +233,7 @@ setFreeze (bool f)
     frozen = f;
 
     // Stop sound on a pause
-    FGSoundMgr *s = globals->get_soundmgr();
+    SGSoundMgr *s = globals->get_soundmgr();
     if ( s != NULL ) {
         if ( f ) {
             s->pause();
@@ -334,7 +333,6 @@ setDateString (const char * date_string)
   double lat = current_aircraft.fdm_state->get_Latitude();
   globals->set_warp(warp);
   st->update(lon, lat, cur_time_override->getLongValue(), warp);
-  fgUpdateSkyAndLightingParams();
 }
 
 /**
@@ -352,29 +350,6 @@ getGMTString ()
 }
 
 
-/**
- * Get the texture rendering state.
- */
-static bool
-getTextures ()
-{
-  return (material_lib.get_step() == 0);
-}
-
-
-/**
- * Set the texture rendering state.
- */
-static void
-setTextures (bool textures)
-{
-  if (textures)
-    material_lib.set_step(0);
-  else
-    material_lib.set_step(1);
-}
-
-
 /**
  * Return the magnetic variation
  */
@@ -401,7 +376,10 @@ getMagDip ()
 static double
 getHeadingMag ()
 {
-  return current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
+  double magheading;
+  magheading = current_aircraft.fdm_state->get_Psi() * SGD_RADIANS_TO_DEGREES - getMagVar();
+  if (magheading < 0) magheading += 360;
+  return magheading;
 }
 
 
@@ -589,7 +567,6 @@ fgInitProps ()
   fgTie("/sim/time/gmt", getDateString, setDateString);
   fgSetArchivable("/sim/time/gmt");
   fgTie("/sim/time/gmt-string", getGMTString);
-  fgTie("/sim/rendering/textures", getTextures, setTextures);
 
                                // Orientation
   fgTie("/orientation/heading-magnetic-deg", getHeadingMag);