summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-04 17:48:07 +0100
committerCraig Robbins <kde.psych@gmail.com>2015-03-05 16:49:51 +1000
commitb214cde5b4a833e1826ec6850b95bf1938c8b0a0 (patch)
tree1692546699da08769e7d5e6c10435fb037924aa3 /src/content_sao.cpp
parent9e675793155d7cd56bbd2222df7b45245008c647 (diff)
downloadminetest-b214cde5b4a833e1826ec6850b95bf1938c8b0a0.tar.gz
minetest-b214cde5b4a833e1826ec6850b95bf1938c8b0a0.tar.bz2
minetest-b214cde5b4a833e1826ec6850b95bf1938c8b0a0.zip
Remove Queue class which uses std::list and use native std::queue
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 9dadcede9..9b2e41677 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -91,7 +91,7 @@ public:
data += itos(m_base_position.Z);
ActiveObjectMessage aom(getId(), false, data);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
}
@@ -233,7 +233,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
std::string str = getPropertyPacket();
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
// If attached, check that our parent is still there. If it isn't, detach.
@@ -320,7 +320,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
m_armor_groups);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(m_animation_sent == false){
@@ -328,7 +328,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
std::string str = gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(m_bone_position_sent == false){
@@ -337,7 +337,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
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_back(aom);
+ m_messages_out.push(aom);
}
}
@@ -346,7 +346,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
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_back(aom);
+ m_messages_out.push(aom);
}
}
@@ -461,7 +461,7 @@ int LuaEntitySAO::punch(v3f dir,
std::string str = gob_cmd_punched(result.damage, getHP());
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(getHP() == 0)
@@ -610,7 +610,7 @@ void LuaEntitySAO::setTextureMod(const std::string &mod)
std::string str = gob_cmd_set_texture_mod(mod);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
void LuaEntitySAO::setSprite(v2s16 p, int num_frames, float framelength,
@@ -624,7 +624,7 @@ void LuaEntitySAO::setSprite(v2s16 p, int num_frames, float framelength,
);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
std::string LuaEntitySAO::getName()
@@ -664,7 +664,7 @@ void LuaEntitySAO::sendPosition(bool do_interpolate, bool is_movement_end)
);
// create message and add to list
ActiveObjectMessage aom(getId(), false, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
bool LuaEntitySAO::getCollisionBox(aabb3f *toset) {
@@ -856,7 +856,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
std::string str = getPropertyPacket();
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
// If attached, check that our parent is still there. If it isn't, detach.
@@ -919,7 +919,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
);
// create message and add to list
ActiveObjectMessage aom(getId(), false, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(m_armor_groups_sent == false) {
@@ -928,7 +928,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
m_armor_groups);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(m_physics_override_sent == false){
@@ -938,7 +938,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
m_physics_override_sneak, m_physics_override_sneak_glitch);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(m_animation_sent == false){
@@ -946,7 +946,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
std::string str = gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
}
if(m_bone_position_sent == false){
@@ -955,7 +955,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
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_back(aom);
+ m_messages_out.push(aom);
}
}
@@ -964,7 +964,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
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_back(aom);
+ m_messages_out.push(aom);
}
}
@@ -1025,7 +1025,7 @@ int PlayerSAO::punch(v3f dir,
std::string str = gob_cmd_punched(0, getHP());
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
- m_messages_out.push_back(aom);
+ m_messages_out.push(aom);
return 0;
}
}