From bf403b923ab4a1e11447b3f81d54d5d0c1124f65 Mon Sep 17 00:00:00 2001 From: sapier Date: Fri, 1 Sep 2017 11:15:12 +0200 Subject: =?UTF-8?q?Fix=20animation=20frame=5Fspeed=20and=20blend=20loosing?= =?UTF-8?q?=20precision=20due=20to=20incorrec=E2=80=A6=20(#6357)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- src/content_sao.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/content_sao.h') diff --git a/src/content_sao.h b/src/content_sao.h index 160ac7f43..019397d83 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -46,6 +46,7 @@ public: const ItemGroupList &getArmorGroups(); void setAnimation(v2f frame_range, float frame_speed, float frame_blend, bool frame_loop); void getAnimation(v2f *frame_range, float *frame_speed, float *frame_blend, bool *frame_loop); + void setAnimationSpeed(float frame_speed); void setBonePosition(const std::string &bone, v3f position, v3f rotation); void getBonePosition(const std::string &bone, v3f *position, v3f *rotation); void setAttachment(int parent_id, const std::string &bone, v3f position, v3f rotation); @@ -70,6 +71,7 @@ protected: float m_animation_blend = 0.0f; bool m_animation_loop = true; bool m_animation_sent = false; + bool m_animation_speed_sent = false; // Stores position and rotation for each bone name std::unordered_map> m_bone_position; -- cgit v1.2.3