// Read messages from object
while(!obj->m_messages_out.empty())
{
- m_active_object_messages.push_back(
+ m_active_object_messages_queue.push(
obj->m_messages_out.front());
obj->m_messages_out.pop();
}
ActiveObjectMessage ServerEnvironment::getActiveObjectMessage()
{
- if(m_active_object_messages.empty())
+ if(m_active_object_messages_queue.empty())
return ActiveObjectMessage(0);
- ActiveObjectMessage message = m_active_object_messages.front();
- m_active_object_messages.pop_front();
+ ActiveObjectMessage message = m_active_object_messages_queue.front();
+ m_active_object_messages_queue.pop();
return message;
}
#include <set>
#include <list>
#include <map>
+#include <queue>
#include "irr_v3d.h"
#include "activeobject.h"
#include "util/numeric.h"
// Active object list
std::map<u16, ServerActiveObject*> m_active_objects;
// Outgoing network message buffer for active objects
- std::list<ActiveObjectMessage> m_active_object_messages;
+ std::queue<ActiveObjectMessage> m_active_object_messages_queue;
// Some timers
float m_send_recommended_timer;
IntervalLimiter m_object_management_interval;