1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-25 21:55:25 +02:00

Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)

* Fix animation frame_speed and blend loosing precision due to incorrect data type
Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start
This commit is contained in:
sapier
2017-09-01 11:15:12 +02:00
committed by Loïc Blot
parent b8f06ad37e
commit bf403b923a
10 changed files with 74 additions and 5 deletions

View File

@@ -83,8 +83,8 @@ private:
bool m_initial_tx_basepos_set = false;
bool m_tx_select_horiz_by_yawpitch = false;
v2s32 m_animation_range;
int m_animation_speed = 15;
int m_animation_blend = 0;
float m_animation_speed = 15.0f;
float m_animation_blend = 0.0f;
bool m_animation_loop = true;
// stores position and rotation for each bone name
std::unordered_map<std::string, core::vector2d<v3f>> m_bone_position;
@@ -197,6 +197,8 @@ public:
void updateAnimation();
void updateAnimationSpeed();
void updateBonePosition();
void updateAttachments();