[throwing] Fix value not retrieved before being used

This commit is contained in:
LeMagnesium 2016-03-22 21:49:08 +01:00
parent b53d407979
commit 3c9b2de8ef
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)
for k, obj in pairs(objs) do
if throwing_is_player(self.player, obj) or throwing_is_entity(obj) then
if throwing_touch(pos, objpos) then
if throwing_touch(pos, obj:getpos()) then
local puncher = self.object
if self.player and minetest.get_player_by_name(self.player) then
puncher = minetest.get_player_by_name(self.player)