You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 22:56:30 +09:00
Added byte to WriteAt
This commit is contained in:
@@ -101,6 +101,16 @@ namespace Lidgren.Network
|
||||
m_bitLength += 8;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a byte at a given offset in the buffer
|
||||
/// </summary>
|
||||
public void WriteAt(Int32 offset, byte source) {
|
||||
int newBitLength = Math.Max(m_bitLength, offset + 8);
|
||||
EnsureBufferSize(newBitLength);
|
||||
NetBitWriter.WriteByte((byte) source, 8, m_data, offset);
|
||||
m_bitLength = newBitLength;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a signed byte
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user