do not update stamina if 'interact' priv not true
This commit is contained in:
parent
0f57240fd1
commit
8b766a1ba0
7
init.lua
7
init.lua
@ -57,6 +57,11 @@ local function stamina_update_level(player, level)
|
||||
return
|
||||
end
|
||||
|
||||
-- players without interact priv cannot eat
|
||||
if not minetest.check_player_privs(player, {interact = true}) then
|
||||
return
|
||||
end
|
||||
|
||||
player:set_attribute("stamina:level", level)
|
||||
|
||||
player:hud_change(stamina.players[player:get_player_name()].hud_id,
|
||||
@ -271,7 +276,7 @@ local function stamina_globaltimer(dtime)
|
||||
|
||||
poison_timer = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- sprint control and particle animation
|
||||
|
Loading…
x
Reference in New Issue
Block a user