mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-30 09:55:29 +01:00
Fix some issues with animations, and allow non-looped animations to be defined
This commit is contained in:
@@ -59,8 +59,8 @@ public:
|
||||
s16 getHP() const;
|
||||
void setArmorGroups(const ItemGroupList &armor_groups);
|
||||
ItemGroupList getArmorGroups();
|
||||
void setAnimation(v2f frame_range, float frame_speed, float frame_blend);
|
||||
void getAnimation(v2f *frame_range, float *frame_speed, float *frame_blend);
|
||||
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 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);
|
||||
@@ -106,6 +106,7 @@ private:
|
||||
v2f m_animation_range;
|
||||
float m_animation_speed;
|
||||
float m_animation_blend;
|
||||
bool m_animation_loop;
|
||||
bool m_animation_sent;
|
||||
|
||||
std::map<std::string, core::vector2d<v3f> > m_bone_position;
|
||||
@@ -197,8 +198,8 @@ public:
|
||||
void setBreath(u16 breath);
|
||||
void setArmorGroups(const ItemGroupList &armor_groups);
|
||||
ItemGroupList getArmorGroups();
|
||||
void setAnimation(v2f frame_range, float frame_speed, float frame_blend);
|
||||
void getAnimation(v2f *frame_range, float *frame_speed, float *frame_blend);
|
||||
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 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);
|
||||
@@ -312,6 +313,7 @@ private:
|
||||
v2f m_animation_range;
|
||||
float m_animation_speed;
|
||||
float m_animation_blend;
|
||||
bool m_animation_loop;
|
||||
bool m_animation_sent;
|
||||
|
||||
std::map<std::string, core::vector2d<v3f> > m_bone_position; // Stores position and rotation for each bone name
|
||||
|
||||
Reference in New Issue
Block a user