summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 30c1127..0278320 100644
--- a/init.lua
+++ b/init.lua
@@ -33,7 +33,10 @@ local stat_considered = 0
local stat_displaced = 0
local stat_degraded = 0
-local sealevel = minetest.get_mapgen_params().water_level
+local sealevel = 0
+if not minetest.get_mapgen_params == nil then
+ sealevel = minetest.get_mapgen_params().water_level
+end
local function round(f)
if f >= 0 then