add nil check for sprint
This commit is contained in:
parent
ed153b9e60
commit
e82125db98
3
init.lua
3
init.lua
@ -317,7 +317,8 @@ end
|
||||
local name = player:get_player_name()
|
||||
|
||||
-- check if player can sprint (stamina must be over 6 points)
|
||||
if not stamina.players[name].poisoned
|
||||
if stamina.players[name]
|
||||
and not stamina.players[name].poisoned
|
||||
and not stamina.players[name].drunk
|
||||
and controls and controls.aux1 and controls.up
|
||||
and not minetest.check_player_privs(player, {fast = true})
|
||||
|
Loading…
x
Reference in New Issue
Block a user