From: Perttu Ahola Date: Sun, 18 Mar 2012 16:30:21 +0000 (+0200) Subject: Fix getVisibleBrightness() to return sunlight visibility correctly even if not much... X-Git-Tag: 0.4.dev-20120318~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9c4f68e1745266d97f20c9311d33f7476bb2d964;p=oweals%2Fminetest.git Fix getVisibleBrightness() to return sunlight visibility correctly even if not much of world has been loaded --- diff --git a/src/clientmap.cpp b/src/clientmap.cpp index 3aa8af848..7bf6b2f46 100644 --- a/src/clientmap.cpp +++ b/src/clientmap.cpp @@ -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++){