1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-19 08:36:34 +09:00

UseMessageCoalescing fixed :-)

This commit is contained in:
lidgren
2010-06-09 11:48:35 +00:00
parent 10ae62c4cd
commit ce57b96cf5

View File

@@ -205,7 +205,9 @@ namespace Lidgren.Network
int msgPayloadLength = msg.LengthBytes;
msg.m_lastSentTime = now;
if (!useCoalescing || (ptr > 0 && (ptr + NetPeer.kMaxPacketHeaderSize + msgPayloadLength) > mtu))
if (ptr > 0)
{
if (!useCoalescing || ((ptr + NetPeer.kMaxPacketHeaderSize + msgPayloadLength) > mtu))
{
// send packet and start new packet
bool connectionReset;
@@ -223,6 +225,7 @@ namespace Lidgren.Network
m_throttleDebt += ptr;
ptr = 0;
}
}
//
// encode message