forked from VoxeLibre/VoxeLibre
Slightly lift your right arm when holding an item.
This commit is contained in:
parent
d168bfa791
commit
f5f85a2148
|
@ -106,14 +106,25 @@ minetest.register_entity("wieldview:wieldnode", {
|
|||
if player then
|
||||
local wielded = player:get_wielded_item()
|
||||
local itemstring = wielded:get_name()
|
||||
|
||||
if self.itemstring ~= itemstring then
|
||||
minetest.chat_send_all(dump2(itemstring, "itemstring"))
|
||||
local def = minetest.registered_items[itemstring]
|
||||
self.object:set_properties({glow = def and def.light_source or 0})
|
||||
|
||||
-- wield item as cubic
|
||||
if armor.textures[self.wielder].wielditem == "blank.png" then
|
||||
self.object:set_properties({textures = {itemstring}})
|
||||
else
|
||||
else -- displayed item as flat
|
||||
self.object:set_properties({textures = {""}})
|
||||
end
|
||||
|
||||
if itemstring == "" then -- holding item
|
||||
player:set_bone_position("Arm_Right", vector.new(0, 0, 0), vector.new(0, 0, 0))
|
||||
else -- empty hands
|
||||
player:set_bone_position("Arm_Right", vector.new(0, 0, 0), vector.new(20, 0, 0))
|
||||
end
|
||||
|
||||
self.itemstring = itemstring
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue