X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffg_props.cxx;h=770ca620ea91c281920b2277b6a4418bbdfada57;hb=6077e8a8248db3e27ff10cd654219c8dbb758861;hp=de3e11d26ff01761969ce54a0294ce625ae53f90;hpb=51c04e9e4c4d2ecc0f3ee0a6d3559d1e22e247c5;p=flightgear.git diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index de3e11d26..770ca620e 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include STL_IOSTREAM @@ -41,7 +42,6 @@ #else # include #endif // FG_WEATHERCM -#include #include @@ -352,29 +352,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 +378,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 +569,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);