From ec8e7656382b24080ee620a737cce3ee42234032 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Thu, 7 Nov 2013 20:25:56 +0000 Subject: [PATCH] Bugfix, Invalid vector error --- init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index e3552dc..836d55b 100644 --- a/init.lua +++ b/init.lua @@ -64,7 +64,7 @@ minetest.register_entity("wield3d:wield_entity", { item = "wield3d:hand" end local loc = wield3d_location[item] or location - if vector.equals(loc[1], self.location[1]) == false + if loc[1] ~= self.location[1] or vector.equals(loc[2], self.location[2]) == false or vector.equals(loc[3], self.location[3]) == false then self.object:setpos(pos) @@ -87,9 +87,7 @@ minetest.register_globalstep(function(dtime) local name = player:get_player_name() if name then if not player_wielding[name] then - if add_wield_entity(player) then - player_wielding[name] = 1 - end + player_wielding[name] = add_wield_entity(player) end end end