public void Buffer(NetStream stream, NetTransport transport, int expectedContainerId) { lock (unreliableStreamLock) { if (!CanBuffer(stream, expectedContainerId)) { FlushBuffer(transport); } if (unreliableStream.position == 0) { unreliableStream.WriteMsgId(NetMsgId.Container); unreliableStream.Write(NetGame.currentLevelInstanceID, 4); currentBufferTag = NetGame.currentLevelInstanceID; unreliableStream.Write((uint)writeFrameId, 22); } unreliableStream.WriteStream(stream); } }