From 061eb686c6c68c84d1ea2b574c0123ced2810030 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Sun, 19 Sep 2010 10:53:25 +0200 Subject: [PATCH] Fix wrong movement of 2d cloud layers on N/S courses --- simgear/scene/sky/cloud.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx index 5d8b09ff..0c5b6e21 100644 --- a/simgear/scene/sky/cloud.cxx +++ b/simgear/scene/sky/cloud.cxx @@ -756,7 +756,7 @@ bool SGCloudLayer::reposition( const SGVec3f& p, const SGVec3f& up, double lon, double ax = 0.0, ay = 0.0, bx = 0.0, by = 0.0; if (dist > 0.0) { - ax = cos(course) * dist; + ax = -cos(course) * dist; ay = sin(course) * dist; } @@ -769,6 +769,7 @@ bool SGCloudLayer::reposition( const SGVec3f& p, const SGVec3f& up, double lon, double xoff = (ax + bx) / (2 * scale); double yoff = (ay + by) / (2 * scale); + // const float layer_scale = layer_span / scale; // cout << "xoff = " << xoff << ", yoff = " << yoff << endl;