1
0
Fork 0

Only 30% sprint speed, no higher sprint jump

This commit is contained in:
Wuzzy 2017-02-21 15:43:04 +01:00
parent dd03c2a62a
commit 94eb0b19e6
3 changed files with 5 additions and 8 deletions

View File

@ -83,9 +83,9 @@ function setSprinting(playerName, sprinting) --Sets the state of a player (0=sto
-- Don't overwrite physics when standing on soul sand -- Don't overwrite physics when standing on soul sand
if playerplus[playerName].nod_stand ~= "mcl_nether:soul_sand" then if playerplus[playerName].nod_stand ~= "mcl_nether:soul_sand" then
if sprinting == true then if sprinting == true then
player:set_physics_override({speed=SPRINT_SPEED,jump=SPRINT_JUMP}) player:set_physics_override({speed=SPRINT_SPEED})
elseif sprinting == false then elseif sprinting == false then
player:set_physics_override({speed=1.0,jump=1.0}) player:set_physics_override({speed=1.0})
end end
return true return true
end end

View File

@ -9,11 +9,8 @@ distributed without any warranty.
--Configuration variables, these are all explained in README.md --Configuration variables, these are all explained in README.md
SPRINT_METHOD = 1 SPRINT_METHOD = 1
SPRINT_SPEED = 1.8 SPRINT_SPEED = 1.3
SPRINT_JUMP = 1.1
SPRINT_STAMINA = 20
SPRINT_TIMEOUT = 0.5 --Only used if SPRINT_METHOD = 0 SPRINT_TIMEOUT = 0.5 --Only used if SPRINT_METHOD = 0
SPRINT_HUDBARS_USED = false
if SPRINT_METHOD == 0 then if SPRINT_METHOD == 0 then
dofile(minetest.get_modpath("mcl_sprint") .. "/wsprint.lua") dofile(minetest.get_modpath("mcl_sprint") .. "/wsprint.lua")

View File

@ -94,11 +94,11 @@ function setState(playerName, state) --Sets the state of a player (0=stopped, 1=
-- Don't overwrite physics when standing on soul sand -- Don't overwrite physics when standing on soul sand
if playerplus[playerName].nod_stand ~= "mcl_nether:soul_sand" then if playerplus[playerName].nod_stand ~= "mcl_nether:soul_sand" then
if state == 0 then--Stopped if state == 0 then--Stopped
player:set_physics_override({speed=1.0,jump=1.0}) player:set_physics_override({speed=1.0})
elseif state == 2 then --Primed elseif state == 2 then --Primed
players[playerName]["timeOut"] = gameTime players[playerName]["timeOut"] = gameTime
elseif state == 3 then --Sprinting elseif state == 3 then --Sprinting
player:set_physics_override({speed=SPRINT_SPEED,jump=SPRINT_JUMP}) player:set_physics_override({speed=SPRINT_SPEED})
end end
return true return true
end end