mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-01-09 17:50:25 +01:00
Another crash bugfix, for the same reason as in the previous commit
This commit is contained in:
parent
6d84b5d63a
commit
15e57c0397
6
init.lua
6
init.lua
@ -35,16 +35,16 @@ local function arrow_step(self, dtime)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local hit = function(pos, node, obj)
|
local hit = function(pos, node, obj)
|
||||||
self.object:remove()
|
|
||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
if obj:is_player() then
|
if obj:is_player() then
|
||||||
if self.timer > 0.2 and obj:get_playername() == self.player then -- Avoid hitting the hitter
|
if self.timer > 0.2 and obj:get_player_name() == self.player then -- Avoid hitting the hitter
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.object:remove()
|
||||||
|
|
||||||
if node and minetest.is_protected(pos, self.player) then -- Forbid hitting nodes in protected areas
|
if node and minetest.is_protected(pos, self.player) then -- Forbid hitting nodes in protected areas
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user