mirror of
https://github.com/minetest-mods/hbsprint.git
synced 2025-01-03 11:07:29 +01:00
remove unused key configurability
This commit is contained in:
parent
4cf32dd3f4
commit
97e9e9024a
11
init.lua
11
init.lua
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
local speed = tonumber(minetest.settings:get ("sprint_speed")) or 1.3
|
local speed = tonumber(minetest.settings:get ("sprint_speed")) or 1.3
|
||||||
local jump = tonumber(minetest.settings:get ("sprint_jump")) or 1.1
|
local jump = tonumber(minetest.settings:get ("sprint_jump")) or 1.1
|
||||||
local key = minetest.settings:get ("sprint_key") or "Use"
|
|
||||||
local dir = minetest.settings:get_bool("sprint_forward_only") ~= false
|
local dir = minetest.settings:get_bool("sprint_forward_only") ~= false
|
||||||
local particles = tonumber(minetest.settings:get ("sprint_particles")) or 2
|
local particles = tonumber(minetest.settings:get ("sprint_particles")) or 2
|
||||||
local stamina = minetest.settings:get_bool("sprint_stamina") ~= false
|
local stamina = minetest.settings:get_bool("sprint_stamina") ~= false
|
||||||
@ -26,7 +25,6 @@ if minetest.get_modpath("hbhunger") then
|
|||||||
starve = "hbhunger"
|
starve = "hbhunger"
|
||||||
elseif minetest.get_modpath("hunger_ng") then
|
elseif minetest.get_modpath("hunger_ng") then
|
||||||
starve = "hunger_ng"
|
starve = "hunger_ng"
|
||||||
--starve_drain = starve_drain * -1
|
|
||||||
else
|
else
|
||||||
starve = false
|
starve = false
|
||||||
end
|
end
|
||||||
@ -157,16 +155,11 @@ minetest.register_globalstep(function(dtime)
|
|||||||
local key_press = false
|
local key_press = false
|
||||||
player:get_meta():set_float("hbsprint_stamina_timer", player:get_meta():get_float("hbsprint_stamina_timer") + sprint_timer)
|
player:get_meta():set_float("hbsprint_stamina_timer", player:get_meta():get_float("hbsprint_stamina_timer") + sprint_timer)
|
||||||
player:get_meta():set_float("hbsprint_breath_timer", player:get_meta():get_float("hbsprint_breath_timer") + sprint_timer)
|
player:get_meta():set_float("hbsprint_breath_timer", player:get_meta():get_float("hbsprint_breath_timer") + sprint_timer)
|
||||||
if key == "Use" and dir then
|
if dir then
|
||||||
key_press = ctrl.aux1 and ctrl.up and not ctrl.left and not ctrl.right
|
key_press = ctrl.aux1 and ctrl.up and not ctrl.left and not ctrl.right
|
||||||
elseif key == "Use" and not dir then
|
else
|
||||||
key_press = ctrl.aux1
|
key_press = ctrl.aux1
|
||||||
end
|
end
|
||||||
-- if key == "W" and dir then
|
|
||||||
-- key_press = ctrl.aux1 and ctrl.up or key_press and ctrl.up
|
|
||||||
-- elseif key == "W" then
|
|
||||||
-- key_press = ctrl.aux1 or key_press and key_tap
|
|
||||||
-- end
|
|
||||||
|
|
||||||
if key_press then
|
if key_press then
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
@ -4,9 +4,6 @@ sprint_speed (Sprint speed multiplier) float 1.3
|
|||||||
#Sprint jump multiplier
|
#Sprint jump multiplier
|
||||||
sprint_jump (Sprint jump multiplier) float 1.1
|
sprint_jump (Sprint jump multiplier) float 1.1
|
||||||
|
|
||||||
#Use a key to sprint
|
|
||||||
sprint_key (Sprint key) enum Use Use
|
|
||||||
|
|
||||||
#Require player to move forward only to be able to sprint
|
#Require player to move forward only to be able to sprint
|
||||||
sprint_forward_only (Sprint forward only) bool true
|
sprint_forward_only (Sprint forward only) bool true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user