From 0ae4e61c7bd22209288c8092aa197cad9ec5e0d8 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Sat, 2 May 2015 11:28:52 -0700 Subject: Arm this call for older versions. Default waterlevel for those will be at 0 --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3