mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Remove Queue class which uses std::list and use native std::queue
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user