diff --git a/climatez.conf b/climatez.conf index fa09c19..3a0c186 100644 --- a/climatez.conf +++ b/climatez.conf @@ -22,4 +22,3 @@ lightning_chance = 300 thunder_sound = true ##Dust Screen Effect for Sandstorms dust_effect = true - diff --git a/engine.lua b/engine.lua index 5f32e06..c523bb9 100644 --- a/engine.lua +++ b/engine.lua @@ -60,15 +60,17 @@ local function player_inside_climate(player_pos) --This function returns the climate_id if inside and true/false if the climate is enabled or not --check altitude if (player_pos.y < climatez.settings.climate_min_height) or (player_pos.y > climate_max_height) then - return false, nil + return false, nil, nil end --check if on water + player_pos.y = player_pos.y + 1 local node_name = minetest.get_node(player_pos).name if minetest.registered_nodes[node_name] and ( minetest.registered_nodes[node_name]["liquidtype"] == "source" or minetest.registered_nodes[node_name]["liquidtype"] == "flowing") then - return false, false + return false, nil, true end + player_pos.y = player_pos.y - 1 --If sphere's centre coordinates is (cx,cy,cz) and its radius is r, --then point (x,y,z) is in the sphere if (x−cx)2+(y−cy)2+(z−cz)2