Turn on sprinting optionally with enable_sprinting = true

If used, disable_anticheat should be set to true, otherwise sprinting players will warp and jitter.
master
James Stevenson 2016-03-02 08:37:32 -05:00
parent 912cb95ba8
commit a4a71ade23
1 changed files with 10 additions and 14 deletions

View File

@ -11,15 +11,12 @@ distributed without any warranty.
-- know how to properly branch a git repository.
--Configuration variables, these are all explained in README.md
--[[
SPRINT_METHOD = 1
SPRINT_SPEED = 2
SPRINT_JUMP = 1
SPRINT_JUMP = 1.2
SPRINT_STAMINA = 20
SPRINT_TIMEOUT = 0.5 --Only used if SPRINT_METHOD = 0
--]]
--[[
if minetest.get_modpath("hudbars") ~= nil then
hb.register_hudbar("sprint", 0xFFFFFF, "Stamina",
{ bar = "sprint_stamina_bar.png", icon = "sprint_stamina_icon.png" },
@ -29,15 +26,14 @@ if minetest.get_modpath("hudbars") ~= nil then
else
SPRINT_HUDBARS_USED = false
end
--]]
--[[
if SPRINT_METHOD == 0 then
dofile(minetest.get_modpath("sprint") .. "/wsprint.lua")
elseif SPRINT_METHOD == 1 then
dofile(minetest.get_modpath("sprint") .. "/esprint.lua")
else
minetest.log("error", "Sprint Mod - SPRINT_METHOD is not set properly, using e to sprint")
dofile(minetest.get_modpath("sprint") .. "/esprint.lua")
if minetest.is_yes(minetest.setting_getbool("enable_sprinting")) then
if SPRINT_METHOD == 0 then
dofile(minetest.get_modpath("sprint") .. "/wsprint.lua")
elseif SPRINT_METHOD == 1 then
dofile(minetest.get_modpath("sprint") .. "/esprint.lua")
else
minetest.log("error", "Sprint Mod - SPRINT_METHOD is not set properly, using e to sprint")
dofile(minetest.get_modpath("sprint") .. "/esprint.lua")
end
end
--]]