Only fatal punch triggers jail.
This commit is contained in:
parent
2d0cecb728
commit
a7161036a0
@ -1,3 +1,3 @@
|
|||||||
default
|
default
|
||||||
farming
|
farming
|
||||||
bucket
|
bucket
|
||||||
|
2
init.lua
2
init.lua
@ -131,7 +131,7 @@ if minetest.register_on_punchplayer then --new way of finding attackers, not
|
|||||||
city_block.attack[pname] = t;
|
city_block.attack[pname] = t;
|
||||||
local hp = player:get_hp();
|
local hp = player:get_hp();
|
||||||
|
|
||||||
if (hp - damage) <= 0 then -- player will die
|
if hp > 0 and (hp - damage) <= 0 then -- player will die because of this hit
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
|
|
||||||
if city_block:in_city(pos) then
|
if city_block:in_city(pos) then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user