Skip to content

Commit 9b4e59c

Browse files
Fix node placement animation desync (#17001)
1 parent c36432b commit 9b4e59c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/client/camera.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,14 @@ void Camera::updateViewingRange()
590590

591591
void Camera::setDigging(s32 button)
592592
{
593-
if (m_digging_button == -1)
593+
// If placing, do not desynchronize the animation and placement sound.
594+
if (button == 1) {
594595
m_digging_button = button;
596+
m_digging_anim = 0.0f;
597+
} else if (m_digging_button == -1) {
598+
// Any other action.
599+
m_digging_button = button;
600+
}
595601
}
596602

597603
void Camera::wield(const ItemStack &item)

0 commit comments

Comments
 (0)