mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-04 21:10:04 -04:00
Merge 211c5b870c
into 2392842948
This commit is contained in:
commit
363be6fddf
1 changed files with 4 additions and 1 deletions
|
@ -128,7 +128,10 @@ local function entity_physics(pos, radius)
|
||||||
end
|
end
|
||||||
|
|
||||||
local damage = (4 / dist) * radius
|
local damage = (4 / dist) * radius
|
||||||
obj:set_hp(obj:get_hp() - damage)
|
local hp = obj:get_hp()
|
||||||
|
if hp > 0 then
|
||||||
|
obj:set_hp(hp - damage)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue