aboutsummaryrefslogtreecommitdiff
path: root/src/content_cao.h
diff options
context:
space:
mode:
authorsapier <sapier@users.noreply.github.com>2017-09-01 11:15:12 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-09-01 11:15:12 +0200
commitbf403b923ab4a1e11447b3f81d54d5d0c1124f65 (patch)
tree8c8f73e07051d8de8d5eb5c488bfdbc4377de3b3 /src/content_cao.h
parentb8f06ad37e142004335e8c2ffaec5fe73b620196 (diff)
downloaddragonfireclient-bf403b923ab4a1e11447b3f81d54d5d0c1124f65.tar.xz
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
Diffstat (limited to 'src/content_cao.h')
-rw-r--r--src/content_cao.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/content_cao.h b/src/content_cao.h
index 0b0e907c5..93b532aad 100644
--- a/src/content_cao.h
+++ b/src/content_cao.h
@@ -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();