1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 15:16:33 +09:00

Removed unnecessary allocation

This commit is contained in:
lidgren
2014-08-12 20:44:39 +00:00
parent c2f8346ca3
commit 715746eed3
2 changed files with 5 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ namespace Lidgren.Network
int bitsLeft = msg.LengthBits;
for (int i = 0; i < numChunks; i++)
{
NetOutgoingMessage chunk = CreateMessage(mtu);
NetOutgoingMessage chunk = CreateMessage(0);
chunk.m_bitLength = (bitsLeft > bitsPerChunk ? bitsPerChunk : bitsLeft);
chunk.m_data = msg.m_data;