X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffg_props.cxx;h=770ca620ea91c281920b2277b6a4418bbdfada57;hb=6077e8a8248db3e27ff10cd654219c8dbb758861;hp=04061b7f9eab4d2166eb2d46a22fcdd9a5107730;hpb=65c3caa032ea767c0c736bb7a103fd5b483227c1;p=flightgear.git diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index 04061b7f9..770ca620e 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -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);