From fb0c43186422ad985e70f73bc70eeb07cc194909 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 25 Oct 2012 23:29:07 +0300 Subject: Allow the LUA API to set animations to meshes as well as the animation speed. Also update animations only when needed. Support for animation blending, though for some reason it doesn't work. Don't enable animation transitions by default for many reaosons Object property to store individual bone positions. LUA can specify a bone name followed by a bone position. No functionality yet. Bone rotation to be added in the following commit Same system for bone rotation, plus a few other things I missed --- src/object_properties.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/object_properties.h') diff --git a/src/object_properties.h b/src/object_properties.h index 48240e6ea..3ab488f92 100644 --- a/src/object_properties.h +++ b/src/object_properties.h @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "irrlichttypes_bloated.h" #include +#include struct ObjectProperties { @@ -33,6 +34,11 @@ struct ObjectProperties core::aabbox3d collisionbox; std::string visual; std::string mesh; + core::vector2d animation_frames; + float animation_speed; + float animation_blend; + std::map animation_bone_position; + std::map animation_bone_rotation; v2f visual_size; core::array textures; v2s16 spritediv; @@ -41,6 +47,7 @@ struct ObjectProperties bool makes_footstep_sound; float automatic_rotate; + ObjectProperties(); std::string dump(); void serialize(std::ostream &os) const; -- cgit v1.2.3