Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Re-apply 972d17b...
but not rename the container. Approved-By est31
  • Loading branch information
Loic BLOT (@UXP) committed Apr 22, 2015
1 parent 17a173f commit f2155f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/environment.cpp
Expand Up @@ -1238,7 +1238,7 @@ void ServerEnvironment::step(float dtime)
// Read messages from object
while(!obj->m_messages_out.empty())
{
m_active_object_messages.push_back(
m_active_object_messages.push(
obj->m_messages_out.front());
obj->m_messages_out.pop();
}
Expand Down Expand Up @@ -1462,7 +1462,7 @@ ActiveObjectMessage ServerEnvironment::getActiveObjectMessage()
return ActiveObjectMessage(0);

ActiveObjectMessage message = m_active_object_messages.front();
m_active_object_messages.pop_front();
m_active_object_messages.pop();
return message;
}

Expand Down
3 changes: 2 additions & 1 deletion src/environment.h
Expand Up @@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#include <set>
#include <list>
#include <queue>
#include <map>
#include "irr_v3d.h"
#include "activeobject.h"
Expand Down Expand Up @@ -378,7 +379,7 @@ class ServerEnvironment : public Environment
// 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;
// Some timers
float m_send_recommended_timer;
IntervalLimiter m_object_management_interval;
Expand Down

0 comments on commit f2155f2

Please sign in to comment.