mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-04-02 10:40:33 +02:00
Come back is HUD/hunger.lua : EXHAUS' bug fixed!
This commit is contained in:
parent
d57a4701f2
commit
7e8dbab444
@ -352,7 +352,7 @@ end
|
|||||||
|
|
||||||
-- player-action based hunger changes
|
-- player-action based hunger changes
|
||||||
function hud.handle_node_actions(pos, oldnode, player, ext)
|
function hud.handle_node_actions(pos, oldnode, player, ext)
|
||||||
--[[if not player or not player:is_player() then
|
if not player or not player:is_player() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
@ -368,9 +368,7 @@ function hud.handle_node_actions(pos, oldnode, player, ext)
|
|||||||
new = HUD_HUNGER_EXHAUST_MOVE
|
new = HUD_HUNGER_EXHAUST_MOVE
|
||||||
end
|
end
|
||||||
if exhaus == nil then return end
|
if exhaus == nil then return end
|
||||||
print("zerobin")
|
exhaus = (exhaus or 0) + new
|
||||||
print(exhaus) -- If exhaus goes through the condition
|
|
||||||
exhaus = exhaus + new
|
|
||||||
if exhaus > HUD_HUNGER_EXHAUST_LVL then
|
if exhaus > HUD_HUNGER_EXHAUST_LVL then
|
||||||
exhaus = 0
|
exhaus = 0
|
||||||
local h = tonumber(hud.hunger[name])
|
local h = tonumber(hud.hunger[name])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user