Skip to content

Commit c1b236b

Browse files
SmallJokersfan5
authored andcommittedFeb 7, 2021
weather: Fix error caused by missing biomes
1 parent 9d419bf commit c1b236b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎mods/weather/init.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ local function update_clouds()
8888
local n_speedz = nobj_speedz:get_2d({x = time, y = 0}) -- -1 to 1
8989

9090
for _, player in ipairs(minetest.get_connected_players()) do
91-
local humid = minetest.get_humidity(player:get_pos())
91+
-- Fallback to mid-value 50 for very old worlds
92+
local humid = minetest.get_humidity(player:get_pos()) or 50
9293
-- Default and classic density value is 0.4, make this happen
9394
-- at humidity midvalue 50 when n_density is at midvalue 0.5.
9495
-- density_max = 0.25 at humid = 0.

0 commit comments

Comments
 (0)