mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix getVisibleBrightness() to return sunlight visibility correctly even if not much of world has been loaded
This commit is contained in:
parent
4ee4dfdc13
commit
9c4f68e174
1 changed files with 1 additions and 0 deletions
|
@ -543,6 +543,7 @@ static bool getVisibleBrightness(Map *map, v3f p0, v3f dir, float step,
|
||||||
float newd = 2*BS;
|
float newd = 2*BS;
|
||||||
pf = p0 + dir * 2*newd;
|
pf = p0 + dir * 2*newd;
|
||||||
distance = newd;
|
distance = newd;
|
||||||
|
sunlight_min_d = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int i=0; distance < end_distance; i++){
|
for(int i=0; distance < end_distance; i++){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue