mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Fix crash when slain by named mob
This commit is contained in:
parent
c80b1c5140
commit
20a4e038f5
1 changed files with 3 additions and 3 deletions
|
@ -193,7 +193,7 @@ minetest.register_on_dieplayer(function(player, reason)
|
||||||
|
|
||||||
-- Player was slain by potions
|
-- Player was slain by potions
|
||||||
if not hitter then return end
|
if not hitter then return end
|
||||||
|
|
||||||
local hittername, hittertype, hittersubtype, shooter
|
local hittername, hittertype, hittersubtype, shooter
|
||||||
local hitter_toolname = get_tool_name(hitter:get_wielded_item())
|
local hitter_toolname = get_tool_name(hitter:get_wielded_item())
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ minetest.register_on_dieplayer(function(player, reason)
|
||||||
end
|
end
|
||||||
hittersubtype = hitter:get_luaentity().name
|
hittersubtype = hitter:get_luaentity().name
|
||||||
if hittername then
|
if hittername then
|
||||||
msg = dmsg("murder", name, hittername)
|
msg = dmsg("murder_hand", name, hittername)
|
||||||
elseif hittersubtype ~= nil and hittersubtype ~= "" then
|
elseif hittersubtype ~= nil and hittersubtype ~= "" then
|
||||||
msg = mmsg(hittersubtype, name)
|
msg = mmsg(hittersubtype, name)
|
||||||
else
|
else
|
||||||
|
@ -304,4 +304,4 @@ function mcl_death_messages.player_damage(player, message)
|
||||||
if dmg_sequence_number >= 65535 then
|
if dmg_sequence_number >= 65535 then
|
||||||
dmg_sequence_number = 0
|
dmg_sequence_number = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue