diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-05-21 20:16:22 +0200 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-05-21 20:16:22 +0200 |
commit | 7f6e9e9540875c6227cbfb3949af79e59e6a325c (patch) | |
tree | 5e930fd8d1cbdb69757da6370393ca7cccf7840b | |
parent | 4a9fe1a1d5d19565bca67c0dcb3dbf43bd06f278 (diff) | |
download | minetest-7f6e9e9540875c6227cbfb3949af79e59e6a325c.tar.gz minetest-7f6e9e9540875c6227cbfb3949af79e59e6a325c.tar.bz2 minetest-7f6e9e9540875c6227cbfb3949af79e59e6a325c.zip |
Fix disappearing of wielditem
-rw-r--r-- | src/camera.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index acefff7e7..3d8713d6a 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -147,12 +147,13 @@ void Camera::step(f32 dtime) m_view_bobbing_fall = -1; // Mark the effect as finished } + bool was_under_zero = m_wield_change_timer < 0; if(m_wield_change_timer < 0.125) m_wield_change_timer += dtime; if(m_wield_change_timer > 0.125) m_wield_change_timer = 0.125; - if(m_wield_change_timer >= 0 && m_wield_change_timer - dtime < 0) { + if(m_wield_change_timer >= 0 && was_under_zero) { if(m_wield_mesh_next) { m_wieldnode->setMesh(m_wield_mesh_next); m_wieldnode->setVisible(true); |