mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Add fireDamage game rule (fallDamage and drowningDamage don't work in mcl_damage)
This commit is contained in:
parent
95cb4b7bb5
commit
4ff8268948
1 changed files with 4 additions and 2 deletions
|
@ -168,8 +168,10 @@ minetest.register_on_player_hpchange(function(player, hp_change, mt_reason)
|
||||||
if not damage_enabled[1] then return 0 end
|
if not damage_enabled[1] then return 0 end
|
||||||
local mcl_reason = mcl_damage.from_mt(mt_reason)
|
local mcl_reason = mcl_damage.from_mt(mt_reason)
|
||||||
if not fire_damage_enabled[1] and mcl_reason.type == "fire" then return 0 end
|
if not fire_damage_enabled[1] and mcl_reason.type == "fire" then return 0 end
|
||||||
if not drowning_damage_enabled[1] and mcl_reason.type == "drown" then return 0 end
|
--if not drowning_damage_enabled[1] and mcl_reason.type == "drown" then return 0 end
|
||||||
if not fall_damage_enabled[1] and mcl_reason.type == "fall" then return 0 end
|
--if not fall_damage_enabled[1] and mcl_reason.type == "fall" then return 0 end
|
||||||
|
|
||||||
|
--minetest.log("action", "mcl_reason = "..dump(mcl_reason)..", mt_reason = "..dump(mt_reason))
|
||||||
|
|
||||||
if player:get_hp() > 0 then
|
if player:get_hp() > 0 then
|
||||||
if hp_change < 0 then
|
if hp_change < 0 then
|
||||||
|
|
Loading…
Reference in a new issue