You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-18 16:16:35 +09:00
UseMessageCoalescing fixed :-)
This commit is contained in:
@@ -205,7 +205,9 @@ namespace Lidgren.Network
|
|||||||
int msgPayloadLength = msg.LengthBytes;
|
int msgPayloadLength = msg.LengthBytes;
|
||||||
msg.m_lastSentTime = now;
|
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
|
// send packet and start new packet
|
||||||
bool connectionReset;
|
bool connectionReset;
|
||||||
@@ -223,6 +225,7 @@ namespace Lidgren.Network
|
|||||||
m_throttleDebt += ptr;
|
m_throttleDebt += ptr;
|
||||||
ptr = 0;
|
ptr = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// encode message
|
// encode message
|
||||||
|
|||||||
Reference in New Issue
Block a user