Double the cost of sprinting

This commit is contained in:
rubenwardy 2015-12-05 20:20:14 +00:00
parent 930a56a80e
commit 304799fde6
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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)