summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-05-02 11:28:52 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-05-02 11:28:52 -0700
commit0ae4e61c7bd22209288c8092aa197cad9ec5e0d8 (patch)
tree16bf6c47ddc7712ca05b4acedc836d3d0b1ad280
parentd36199ae398bee1707411f191c7d6bd516249d21 (diff)
Arm this call for older versions. Default waterlevel for those will be at 0
-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