Fix fire resistance bad protect against magmablock
This commit is contained in:
parent
124274053d
commit
9365493696
|
@ -96,6 +96,9 @@ minetest.register_node("mcl_nether:magma", {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
-- From walkover mod
|
-- From walkover mod
|
||||||
on_walk_over = function(loc, nodeiamon, player)
|
on_walk_over = function(loc, nodeiamon, player)
|
||||||
|
if minetest.global_exists("mcl_potions") and mcl_potions.player_has_effect(player, "fire_proof") then
|
||||||
|
return
|
||||||
|
end
|
||||||
-- Hurt players standing on top of this block
|
-- Hurt players standing on top of this block
|
||||||
if player:get_hp() > 0 then
|
if player:get_hp() > 0 then
|
||||||
if mod_death_messages then
|
if mod_death_messages then
|
||||||
|
|
|
@ -503,6 +503,14 @@ function mcl_potions._load_player_effects(player)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Returns true if player has given effect
|
||||||
|
function mcl_potions.player_has_effect(player, effect_name)
|
||||||
|
if not EF[effect_name] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return EF[effect_name][player] ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_on_leaveplayer( function(player)
|
minetest.register_on_leaveplayer( function(player)
|
||||||
mcl_potions._save_player_effects(player)
|
mcl_potions._save_player_effects(player)
|
||||||
mcl_potions._reset_player_effects(player) -- clearout the buffer to prevent looking for a player not there
|
mcl_potions._reset_player_effects(player) -- clearout the buffer to prevent looking for a player not there
|
||||||
|
|
Loading…
Reference in New Issue
Block a user