Move sprint vars into mcl_sprint table
This commit is contained in:
parent
94eb0b19e6
commit
341e8fadb2
4 changed files with 21 additions and 19 deletions
|
@ -8,15 +8,17 @@ distributed without any warranty.
|
|||
]]
|
||||
|
||||
--Configuration variables, these are all explained in README.md
|
||||
SPRINT_METHOD = 1
|
||||
SPRINT_SPEED = 1.3
|
||||
SPRINT_TIMEOUT = 0.5 --Only used if SPRINT_METHOD = 0
|
||||
mcl_sprint = {}
|
||||
|
||||
if SPRINT_METHOD == 0 then
|
||||
mcl_sprint.METHOD = 1
|
||||
mcl_sprint.SPEED = 1.3
|
||||
mcl_sprint.TIMEOUT = 0.5 --Only used if mcl_sprint.METHOD = 0
|
||||
|
||||
if mcl_sprint.METHOD == 0 then
|
||||
dofile(minetest.get_modpath("mcl_sprint") .. "/wsprint.lua")
|
||||
elseif SPRINT_METHOD == 1 then
|
||||
elseif mcl_sprint.METHOD == 1 then
|
||||
dofile(minetest.get_modpath("mcl_sprint") .. "/esprint.lua")
|
||||
else
|
||||
minetest.log("error", "[mcl_sprint] SPRINT_METHOD is not set properly, using [E] to sprint.")
|
||||
minetest.log("error", "[mcl_sprint] mcl_sprint.METHOD is not set properly, using [E] to sprint.")
|
||||
dofile(minetest.get_modpath("mcl_sprint") .. "/esprint.lua")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue