From 268fa336380bc9f98db99eafd056b0081c2c9c88 Mon Sep 17 00:00:00 2001 From: Arturas Norkus Date: Sat, 25 Jun 2016 21:05:43 +0300 Subject: [PATCH] improve underwater check #2 for particles displaying --- weather_core/weather_core.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weather_core/weather_core.lua b/weather_core/weather_core.lua index 0e2b265..34b9dc7 100644 --- a/weather_core/weather_core.lua +++ b/weather_core/weather_core.lua @@ -53,8 +53,8 @@ weather.is_underwater = function(player) local player_eye_pos = {x = ppos.x + offset.x, y = ppos.y + offset.y + 1.5, z = ppos.z + offset.z} - - if minetest.get_node_level(player_eye_pos) == 8 then + local node_level = minetest.get_node_level(player_eye_pos) + if node_level == 8 or node_level == 7 then return true end return false