You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
NetServer.Disconnect added; Buffer.BlockCopy used in NetBitWriter
This commit is contained in:
@@ -72,8 +72,7 @@ namespace Lidgren.Network
|
||||
|
||||
if (startReadAtIndex == 0)
|
||||
{
|
||||
for (int i = 0; i < numberOfBytes; i++)
|
||||
destination[destinationByteOffset++] = fromBuffer[readPtr++];
|
||||
Buffer.BlockCopy(fromBuffer, readPtr, destination, destinationByteOffset, numberOfBytes);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -146,9 +145,7 @@ namespace Lidgren.Network
|
||||
|
||||
if (firstPartLen == 0)
|
||||
{
|
||||
// optimized; TODO: write 32 bit chunks if possible
|
||||
for (int i = 0; i < numberOfBytes; i++)
|
||||
destination[dstBytePtr++] = source[sourceByteOffset + i];
|
||||
Buffer.BlockCopy(source, sourceByteOffset, destination, dstBytePtr, numberOfBytes);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user