aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 1e7e788e9..895c26044 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -347,8 +347,10 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
if(m_bone_position_sent == false){
m_bone_position_sent = true;
- for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
- std::string str = gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y);
+ for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
+ ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
+ std::string str = gob_cmd_update_bone_position((*ii).first,
+ (*ii).second.X, (*ii).second.Y);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push(aom);
@@ -383,8 +385,10 @@ std::string LuaEntitySAO::getClientInitializationData(u16 protocol_version)
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
os<<serializeLongString(gob_cmd_update_animation(
m_animation_range, m_animation_speed, m_animation_blend, m_animation_loop)); // 3
- for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
- os<<serializeLongString(gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y)); // m_bone_position.size
+ for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
+ ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
+ os << serializeLongString(gob_cmd_update_bone_position((*ii).first,
+ (*ii).second.X, (*ii).second.Y)); // m_bone_position.size
}
os<<serializeLongString(gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation)); // 4
}
@@ -862,7 +866,8 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version)
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
os<<serializeLongString(gob_cmd_update_animation(
m_animation_range, m_animation_speed, m_animation_blend, m_animation_loop)); // 3
- for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
+ for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
+ ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
os<<serializeLongString(gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y)); // m_bone_position.size
}
os<<serializeLongString(gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation)); // 4
@@ -1007,19 +1012,22 @@ void PlayerSAO::step(float dtime, bool send_recommended)
m_messages_out.push(aom);
}
- if(m_bone_position_sent == false){
+ if (!m_bone_position_sent) {
m_bone_position_sent = true;
- for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
- std::string str = gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y);
+ for (UNORDERED_MAP<std::string, core::vector2d<v3f> >::const_iterator
+ ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii) {
+ std::string str = gob_cmd_update_bone_position((*ii).first,
+ (*ii).second.X, (*ii).second.Y);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push(aom);
}
}
- if(m_attachment_sent == false){
+ if (!m_attachment_sent){
m_attachment_sent = true;
- std::string str = gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation);
+ std::string str = gob_cmd_update_attachment(m_attachment_parent_id,
+ m_attachment_bone, m_attachment_position, m_attachment_rotation);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push(aom);