From 660fa516bfe774c77947c47a97154d6f069f414d Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 21 Feb 2015 23:38:53 +0200 Subject: Fix some issues with animations, and allow non-looped animations to be defined --- src/content_sao.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/content_sao.cpp') diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 984d2ffa3..386b7e070 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -136,6 +136,7 @@ LuaEntitySAO::LuaEntitySAO(ServerEnvironment *env, v3f pos, m_armor_groups_sent(false), m_animation_speed(0), m_animation_blend(0), + m_animation_loop(true), m_animation_sent(false), m_bone_position_sent(false), m_attachment_parent_id(0), @@ -324,7 +325,8 @@ void LuaEntitySAO::step(float dtime, bool send_recommended) if(m_animation_sent == false){ m_animation_sent = true; - std::string str = gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend); + std::string str = gob_cmd_update_animation( + m_animation_range, m_animation_speed, m_animation_blend, m_animation_loop); // create message and add to list ActiveObjectMessage aom(getId(), true, str); m_messages_out.push(aom); @@ -366,7 +368,8 @@ std::string LuaEntitySAO::getClientInitializationData(u16 protocol_version) writeU8(os, 4 + m_bone_position.size()); // number of messages stuffed in here os< >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){ os< >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){ os<