forked from MineClone5/MineClone5
Fix crash when player got killed by arrow
This commit is contained in:
parent
ae70727353
commit
105d9e9790
|
@ -155,11 +155,13 @@ minetest.register_on_dieplayer(function(player)
|
||||||
end
|
end
|
||||||
-- Arrow
|
-- Arrow
|
||||||
elseif last_damages[name].hittertype == "arrow" then
|
elseif last_damages[name].hittertype == "arrow" then
|
||||||
if last_damages[name].hitter:is_player() then
|
if last_damages[name].shooter == nil then
|
||||||
msg = dmsg("arrow_name", name, last_damages[name].hitter:get_player_name())
|
msg = dmsg("arrow", name)
|
||||||
elseif last_damages[name].hitter:get_luaentity()._cmi_is_mob then
|
elseif last_damages[name].shooter:is_player() then
|
||||||
if last_damages[name].hitter:get_luaentity().nametag ~= "" then
|
msg = dmsg("arrow_name", name, last_damages[name].shooter:get_player_name())
|
||||||
msg = dmsg("arrow_name", name, last_damages[name].hitter:get_player_name())
|
elseif last_damages[name].shooter:get_luaentity()._cmi_is_mob then
|
||||||
|
if last_damages[name].shooter:get_luaentity().nametag ~= "" then
|
||||||
|
msg = dmsg("arrow_name", name, last_damages[name].shooter:get_player_name())
|
||||||
else
|
else
|
||||||
msg = dmsg("arrow", name)
|
msg = dmsg("arrow", name)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue