1
0
mirror of https://github.com/rubenwardy/food.git synced 2024-12-23 08:20:19 +01:00

Stop crash on damage disabled.

This commit is contained in:
rubenwardy 2015-10-27 13:47:31 +00:00
parent 9913055d6a
commit 1724db4fba

View File

@ -174,9 +174,9 @@ function food.item_eat(amt)
elseif minetest.get_modpath("hud") and global_exists("hud") and hud.item_eat then elseif minetest.get_modpath("hud") and global_exists("hud") and hud.item_eat then
return hud.item_eat(amt) return hud.item_eat(amt)
elseif minetest.get_modpath("hbhunger") then elseif minetest.get_modpath("hbhunger") then
if global_exists("hbhunger") then if global_exists("hbhunger") and hbhunger.item_eat then
return hbhunger.item_eat(amt) return hbhunger.item_eat(amt)
elseif global_exists("hunger") then elseif global_exists("hunger") and hunger.item_eat then
-- For backwards compatibility -- For backwards compatibility
-- It used to be called `hunger` rather than `hbhunger` -- It used to be called `hunger` rather than `hbhunger`
return hunger.item_eat(amt) return hunger.item_eat(amt)