Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

This commit is contained in:
Shauren committed 2013-10-26 17:06:50 +02:00
commit 75a790ca47
326 files changed
+3311 -1522

No files matched your search

+10
View File
@@ -313,6 +313,8 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
//! delayed packets that were re-enqueued due to improper timing. To prevent an infinite
//! loop caused by re-enqueueing the same packets over and over again, we stop updating this session
//! and continue updating others. The re-enqueued packets will be handled in the next Update call for this session.
uint32 processedPackets = 0;
while (m_Socket && !m_Socket->IsClosed() &&
!_recvQueue.empty() && _recvQueue.peek(true) != firstDelayedPacket &&
_recvQueue.next(packet, updater))
@@ -414,6 +416,14 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
delete packet;
deletePacket = true;
#define MAX_PROCESSED_PACKETS_IN_SAME_WORLDSESSION_UPDATE 100
processedPackets++;
//process only a max amout of packets in 1 Update() call.
//Any leftover will be processed in next update
if (processedPackets > MAX_PROCESSED_PACKETS_IN_SAME_WORLDSESSION_UPDATE)
break;
}
if (m_Socket && !m_Socket->IsClosed() && _warden)