Buff water attenuation, add attenuation for all other materials.

This commit is contained in:
Aaron Suen 2019-10-14 06:19:45 -04:00
parent 88292e402b
commit 22f24f7444

View File

@ -50,9 +50,11 @@ local function rademit(pos)
local node = minetest.get_node(pt.under)
local def = minetest.registered_items[node.name]
if def and def.groups and def.groups.water then
dsqr = dsqr * 2
if dsqr > (32 * 32) then return end
dsqr = dsqr * 4
elseif node.name ~= "air" then
dsqr = dsqr * 1.5
end
if dsqr > (32 * 32) then return end
end
end
luxaccum[pname] = (luxaccum[pname] or 0) + 1 / dsqr