mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-01-09 09:40:26 +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
|
||||
|
||||
local hit = function(pos, node, obj)
|
||||
self.object:remove()
|
||||
|
||||
if obj 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
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.object:remove()
|
||||
|
||||
if node and minetest.is_protected(pos, self.player) then -- Forbid hitting nodes in protected areas
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user