mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Fix disappearing of wielditem
This commit is contained in:
parent
4a9fe1a1d5
commit
7f6e9e9540
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user