aboutsummaryrefslogtreecommitdiff
path: root/src/object_properties.h
diff options
context:
space:
mode:
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>2012-10-25 23:29:07 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-11-25 18:14:15 +0200
commitfb0c43186422ad985e70f73bc70eeb07cc194909 (patch)
tree2e02bdbe9e9abb6d2ee392ee895fa0b73f000f03 /src/object_properties.h
parent9c8ba427503cbf73f0263495a791656b905c2efc (diff)
downloadminetest-fb0c43186422ad985e70f73bc70eeb07cc194909.tar.gz
minetest-fb0c43186422ad985e70f73bc70eeb07cc194909.tar.bz2
minetest-fb0c43186422ad985e70f73bc70eeb07cc194909.zip
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
Diffstat (limited to 'src/object_properties.h')
-rw-r--r--src/object_properties.h7
1 files changed, 7 insertions, 0 deletions
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 <string>
#include "irrlichttypes_bloated.h"
#include <iostream>
+#include <map>
struct ObjectProperties
{
@@ -33,6 +34,11 @@ struct ObjectProperties
core::aabbox3d<f32> collisionbox;
std::string visual;
std::string mesh;
+ core::vector2d<int> animation_frames;
+ float animation_speed;
+ float animation_blend;
+ std::map<std::string, v3f> animation_bone_position;
+ std::map<std::string, v3f> animation_bone_rotation;
v2f visual_size;
core::array<std::string> 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;