mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Fix crash when player got killed by arrow
This commit is contained in:
parent
ae70727353
commit
105d9e9790
1 changed files with 7 additions and 5 deletions
|
@ -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 a new issue