summaryrefslogtreecommitdiff
path: root/src/genericobject.cpp
diff options
context:
space:
mode:
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>2012-10-26 11:46:46 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-11-25 18:14:15 +0200
commitba4d93027f7b1590f303eff2138cae413faf5c34 (patch)
tree131a875a718d15c50d5d052540f7c433bd2bdb1f /src/genericobject.cpp
parentfb0c43186422ad985e70f73bc70eeb07cc194909 (diff)
downloadminetest-ba4d93027f7b1590f303eff2138cae413faf5c34.tar.gz
minetest-ba4d93027f7b1590f303eff2138cae413faf5c34.tar.bz2
minetest-ba4d93027f7b1590f303eff2138cae413faf5c34.zip
Joint positioning and rotation code, and fix a problem related to their lua API
Attempt to move the animation system to a more correct implementation, rather than using object properties. Incomplete and breaks functionality
Diffstat (limited to 'src/genericobject.cpp')
-rw-r--r--src/genericobject.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/genericobject.cpp b/src/genericobject.cpp
index 4ab031b5d..0914a13c5 100644
--- a/src/genericobject.cpp
+++ b/src/genericobject.cpp
@@ -92,6 +92,19 @@ std::string gob_cmd_set_sprite(
return os.str();
}
+std::string gob_cmd_set_animations(int frame_start, int frame_end, float frame_speed, float frame_blend)
+{
+ std::ostringstream os(std::ios::binary);
+ // command
+ writeU8(os, GENERIC_CMD_SET_ANIMATIONS);
+ // parameters
+ writeU16(os, frame_start);
+ writeU16(os, frame_end);
+ writeF1000(os, frame_speed);
+ writeF1000(os, frame_blend);
+ return os.str();
+}
+
std::string gob_cmd_punched(s16 damage, s16 result_hp)
{
std::ostringstream os(std::ios::binary);