Skip to content

Commit

Permalink
Safety check
Browse files Browse the repository at this point in the history
  • Loading branch information
Panquesito7 committed Sep 13, 2023
1 parent ecdba7f commit 9212957
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ double_jump = {
-- Settings --
---------------

local max_jump_number = tonumber(minetest.settings:get("double_jump.max_jump")) or 1
local max_jump_number = tonumber(minetest.settings:get("double_jump.max_jump")) or 1 -- Builtin jump doesn't count!
local max_jump_height = tonumber(minetest.settings:get("double_jump.max_height")) or 6.5
local privilege_required = minetest.settings:get_bool("double_jump.privilege_required") or false
local infinite_jumps = minetest.settings:get_bool("double_jump.infinite_jumps") or false

-- Make sure the jump number is not something below zero.
if max_jump_number <= 0 then
max_jump_number = 1
end

----------------
-- Privileges --
----------------
Expand Down

0 comments on commit 9212957

Please sign in to comment.