]> git.mxchange.org Git - simgear.git/commitdiff
Do not reduce visibility when passing through a 'few' or 'scattered'
authordavid <david>
Mon, 10 Jan 2005 23:34:52 +0000 (23:34 +0000)
committerdavid <david>
Mon, 10 Jan 2005 23:34:52 +0000 (23:34 +0000)
cloud layer (i.e. <50% coverage).  This is a quick hack rather than a
proper fix, but it will at least make it possible to get above a
scattered layer VFR.

simgear/scene/sky/sky.cxx

index 4b8b43468b901fadec6bdb4dd993cfa19c5e3311..ad8e8ae05caea36f555f0a397f6f2fea55c76590 100644 (file)
@@ -266,8 +266,8 @@ void SGSky::modify_vis( float alt, float time_factor ) {
 
        double ratio = 1.0;
 
-        if ( cloud_layers[i]->getCoverage() == SGCloudLayer::SG_CLOUD_CLEAR ) {
-           // clear layer
+        if ( cloud_layers[i]->getCoverage() == SGCloudLayer::SG_CLOUD_CLEAR || cloud_layers[i]->getCoverage() == SGCloudLayer::SG_CLOUD_FEW || cloud_layers[i]->getCoverage() == SGCloudLayer::SG_CLOUD_SCATTERED) {
+           // less than 50% coverage -- assume we're in the clear for now
            ratio = 1.0;
         } else if ( alt < asl - transition ) {
            // below cloud layer