diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-18 18:30:21 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-18 18:30:21 +0200 |
commit | 9c4f68e1745266d97f20c9311d33f7476bb2d964 (patch) | |
tree | dd4384126aec5692f5ee1779f2e2b2d93395a507 /src | |
parent | 4ee4dfdc13032017594ed93bda9206ea59cc6c91 (diff) | |
download | minetest-9c4f68e1745266d97f20c9311d33f7476bb2d964.tar.gz minetest-9c4f68e1745266d97f20c9311d33f7476bb2d964.tar.bz2 minetest-9c4f68e1745266d97f20c9311d33f7476bb2d964.zip |
Fix getVisibleBrightness() to return sunlight visibility correctly even if not much of world has been loaded
Diffstat (limited to 'src')
-rw-r--r-- | src/clientmap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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++){ |