]> git.mxchange.org Git - simgear.git/commitdiff
Frederic Bouvier:
authorehofman <ehofman>
Fri, 25 Jun 2004 10:59:59 +0000 (10:59 +0000)
committerehofman <ehofman>
Fri, 25 Jun 2004 10:59:59 +0000 (10:59 +0000)
this patch correct the cloud repositionning that
made them going against the wind. Now the clouds
and the windsock show the same direction.

simgear/scene/sky/cloud.cxx

index 48818bcfa5e884dcf9af9b7b32560369efcb2e04..9945ecaf34cd3c0a80e7e03ed083154bfb02d718 100644 (file)
@@ -725,8 +725,8 @@ bool SGCloudLayer::reposition( sgVec3 p, sgVec3 up, double lon, double lat,
         }
 
         if (sp_dist > 0) {
-            bx = cos(-direction * SGD_DEGREES_TO_RADIANS) * sp_dist;
-            by = sin(-direction * SGD_DEGREES_TO_RADIANS) * sp_dist;
+            bx = cos((180.0-direction) * SGD_DEGREES_TO_RADIANS) * sp_dist;
+            by = sin((180.0-direction) * SGD_DEGREES_TO_RADIANS) * sp_dist;
         }