Fix getVisibleBrightness() to return sunlight visibility correctly even if not much...
authorPerttu Ahola <celeron55@gmail.com>
Sun, 18 Mar 2012 16:30:21 +0000 (18:30 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 18 Mar 2012 16:30:21 +0000 (18:30 +0200)
src/clientmap.cpp

index 3aa8af84884c2ba65c64edc46770723b32369c34..7bf6b2f46e62870de5e2e221107bebe85cc0baef 100644 (file)
@@ -543,6 +543,7 @@ static bool getVisibleBrightness(Map *map, v3f p0, v3f dir, float step,
                        float newd = 2*BS;
                        pf = p0 + dir * 2*newd;
                        distance = newd;
+                       sunlight_min_d = 0;
                }
        }
        for(int i=0; distance < end_distance; i++){