mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Adjust number of food particles based on food points gained
This commit is contained in:
parent
9816c91b6e
commit
b020c74fad
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisen, heal, sou
|
|||
local maxvel = vector.add(v, {x=1, y=2, z=1})
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 20,
|
||||
amount = math.min(math.max(8, hunger_change*2), 25),
|
||||
time = 0.1,
|
||||
minpos = {x=pos.x, y=pos.y, z=pos.z},
|
||||
maxpos = {x=pos.x, y=pos.y, z=pos.z},
|
||||
|
|
Loading…
Reference in a new issue