Double the cost of sprinting
This commit is contained in:
parent
930a56a80e
commit
304799fde6
2 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
--Lower the player's stamina by dtime if he/she is sprinting and set his/her state to 0 if stamina is zero
|
||||
if playerInfo["sprinting"] == true then
|
||||
playerInfo["stamina"] = playerInfo["stamina"] - dtime
|
||||
playerInfo["stamina"] = playerInfo["stamina"] - dtime * 2
|
||||
if playerInfo["stamina"] <= 0 then
|
||||
playerInfo["stamina"] = 0
|
||||
setSprinting(playerName, false)
|
||||
|
|
|
@ -90,7 +90,7 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
--Lower the player's stamina by dtime if he/she is sprinting and set his/her state to 0 if stamina is zero
|
||||
if playerInfo["state"] == 3 then
|
||||
playerInfo["stamina"] = playerInfo["stamina"] - dtime
|
||||
playerInfo["stamina"] = playerInfo["stamina"] - dtime * 2
|
||||
if playerInfo["stamina"] <= 0 then
|
||||
playerInfo["stamina"] = 0
|
||||
setState(playerName, 0)
|
||||
|
|
Loading…
Reference in a new issue