aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-05-20 20:31:38 +0200
committerPilzAdam <pilzadam@minetest.net>2013-05-20 20:31:38 +0200
commite57dc4ef1899fd172b94dc67c3a70be49803145e (patch)
tree0cfbccb4a374db5e59aa5a318f6c8b19ef78da74 /src
parentc67f72890c3f9154dd9124310c61ba55bc2806bd (diff)
downloadminetest-e57dc4ef1899fd172b94dc67c3a70be49803145e.tar.gz
minetest-e57dc4ef1899fd172b94dc67c3a70be49803145e.tar.bz2
minetest-e57dc4ef1899fd172b94dc67c3a70be49803145e.zip
Dont animate changing wielditem from hand to hand
Diffstat (limited to 'src')
-rw-r--r--src/camera.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/camera.cpp b/src/camera.cpp
index f227bd98a..acefff7e7 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -588,7 +588,8 @@ void Camera::wield(const ItemStack &item, u16 playeritem)
IItemDefManager *idef = m_gamedef->idef();
std::string itemname = item.getDefinition(idef).name;
m_wield_mesh_next = idef->getWieldMesh(itemname, m_gamedef);
- if(playeritem != m_previous_playeritem) {
+ if(playeritem != m_previous_playeritem &&
+ !(m_previous_itemname == "" && itemname == "")) {
m_previous_playeritem = playeritem;
m_previous_itemname = itemname;
if(m_wield_change_timer >= 0.125)