1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Draw node animation for items (#15930)

This commit is contained in:
cx384 2025-04-04 18:47:11 +02:00 committed by GitHub
parent 1db5a2f950
commit a6d4cd7c15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 117 additions and 74 deletions

View file

@ -134,7 +134,8 @@ void Camera::step(f32 dtime)
if (m_wield_change_timer >= 0 && was_under_zero) {
m_wieldnode->setItem(m_wield_item_next, m_client);
m_wieldnode->setNodeLightColor(m_player_light_color);
m_wieldnode->setLightColorAndAnimation(m_player_light_color,
m_client->getAnimationTime());
}
if (m_view_bobbing_state != 0)
@ -537,7 +538,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 tool_reload_ratio)
m_wieldnode->setRotation(wield_rotation);
m_player_light_color = player->light_color;
m_wieldnode->setNodeLightColor(m_player_light_color);
m_wieldnode->setLightColorAndAnimation(m_player_light_color,
m_client->getAnimationTime());
// Set render distance
updateViewingRange();