Show bare hand when no item is selected
authorPerttu Ahola <celeron55@gmail.com>
Fri, 2 Dec 2011 13:20:42 +0000 (15:20 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 2 Dec 2011 13:20:42 +0000 (15:20 +0200)
data/mods/default/textures/wieldhand.png [new file with mode: 0644]
src/camera.cpp

diff --git a/data/mods/default/textures/wieldhand.png b/data/mods/default/textures/wieldhand.png
new file mode 100644 (file)
index 0000000..c4549e5
Binary files /dev/null and b/data/mods/default/textures/wieldhand.png differ
index 6c81c46e2c59d5fa6f450c8698bd8ec2d42ff27e..8f421e6916852ade67b21f6a69a60d86939cb8dd 100644 (file)
@@ -277,7 +277,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize)
 
        // Position the wielded item
        v3f wield_position = v3f(45, -35, 65);
-       v3f wield_rotation = v3f(-100, 110, -100);
+       v3f wield_rotation = v3f(-100, 120, -100);
        if (m_digging_button != -1)
        {
                f32 digfrac = m_digging_anim;
@@ -500,7 +500,9 @@ void Camera::wield(const InventoryItem* item, IGameDef *gamedef)
        else
        {
                // Bare hands
-               m_wieldnode->setVisible(false);
+               m_wieldnode->setSprite(gamedef->tsrc()->getTextureRaw("wieldhand.png"));
+               m_wieldnode->setScale(v3f(40));
+               m_wieldnode->setVisible(true);
        }
 }