Revert "m_active_object_messages is used like a queue. Use std::queue instead of std::list. Also rename to m_active_object_messages_queue"
This reverts commit 972d17baea
.
The commit being reverted was unauthorized. There had been no discussion,
review, or sign-off prior to submittal to upstream.
master
parent
972d17baea
commit
e0eec201a1
|
@ -1238,7 +1238,7 @@ void ServerEnvironment::step(float dtime)
|
||||||
// Read messages from object
|
// Read messages from object
|
||||||
while(!obj->m_messages_out.empty())
|
while(!obj->m_messages_out.empty())
|
||||||
{
|
{
|
||||||
m_active_object_messages_queue.push(
|
m_active_object_messages.push_back(
|
||||||
obj->m_messages_out.front());
|
obj->m_messages_out.front());
|
||||||
obj->m_messages_out.pop();
|
obj->m_messages_out.pop();
|
||||||
}
|
}
|
||||||
|
@ -1458,11 +1458,11 @@ void ServerEnvironment::getRemovedActiveObjects(v3s16 pos, s16 radius,
|
||||||
|
|
||||||
ActiveObjectMessage ServerEnvironment::getActiveObjectMessage()
|
ActiveObjectMessage ServerEnvironment::getActiveObjectMessage()
|
||||||
{
|
{
|
||||||
if(m_active_object_messages_queue.empty())
|
if(m_active_object_messages.empty())
|
||||||
return ActiveObjectMessage(0);
|
return ActiveObjectMessage(0);
|
||||||
|
|
||||||
ActiveObjectMessage message = m_active_object_messages_queue.front();
|
ActiveObjectMessage message = m_active_object_messages.front();
|
||||||
m_active_object_messages_queue.pop();
|
m_active_object_messages.pop_front();
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
|
||||||
#include "irr_v3d.h"
|
#include "irr_v3d.h"
|
||||||
#include "activeobject.h"
|
#include "activeobject.h"
|
||||||
#include "util/numeric.h"
|
#include "util/numeric.h"
|
||||||
|
@ -379,7 +378,7 @@ private:
|
||||||
// Active object list
|
// Active object list
|
||||||
std::map<u16, ServerActiveObject*> m_active_objects;
|
std::map<u16, ServerActiveObject*> m_active_objects;
|
||||||
// Outgoing network message buffer for active objects
|
// Outgoing network message buffer for active objects
|
||||||
std::queue<ActiveObjectMessage> m_active_object_messages_queue;
|
std::list<ActiveObjectMessage> m_active_object_messages;
|
||||||
// Some timers
|
// Some timers
|
||||||
float m_send_recommended_timer;
|
float m_send_recommended_timer;
|
||||||
IntervalLimiter m_object_management_interval;
|
IntervalLimiter m_object_management_interval;
|
||||||
|
|
Loading…
Reference in New Issue