mirror of
https://github.com/stujones11/wield3d.git
synced 2024-12-28 08:47:27 +01:00
Bugfix, Invalid vector error
This commit is contained in:
parent
9cf2cb9164
commit
ec8e765638
6
init.lua
6
init.lua
@ -64,7 +64,7 @@ minetest.register_entity("wield3d:wield_entity", {
|
|||||||
item = "wield3d:hand"
|
item = "wield3d:hand"
|
||||||
end
|
end
|
||||||
local loc = wield3d_location[item] or location
|
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[2], self.location[2]) == false
|
||||||
or vector.equals(loc[3], self.location[3]) == false then
|
or vector.equals(loc[3], self.location[3]) == false then
|
||||||
self.object:setpos(pos)
|
self.object:setpos(pos)
|
||||||
@ -87,9 +87,7 @@ minetest.register_globalstep(function(dtime)
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if name then
|
if name then
|
||||||
if not player_wielding[name] then
|
if not player_wielding[name] then
|
||||||
if add_wield_entity(player) then
|
player_wielding[name] = add_wield_entity(player)
|
||||||
player_wielding[name] = 1
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user