public override Task Read(SourceBufferReader buf, SourceDemo demo) { Position = buf.ReadVectorBitCoord(); DecalTextureIndex = buf.ReadUBits(9); if (buf.ReadBoolean()) { EntityIndex = buf.ReadUBits(11); ModelIndex = buf.ReadUBits(11); } LowPriority = buf.ReadBoolean(); return(Task.CompletedTask); }
public override Task Read(SourceBufferReader buf, SourceDemo demo) { ReliableSound = buf.ReadBoolean(); Sounds = (ReliableSound) ? 1 : buf.ReadUBits(8); var length = (ReliableSound) ? buf.ReadUBits(8) : buf.ReadUBits(16); buf.SeekBits((int)length); return(Task.CompletedTask); }
public override Task Read(SourceBufferReader buf, SourceDemo demo) { TableName = buf.ReadString(); MaxEntries = buf.ReadUInt16(); var bits = (int)System.Math.Log(MaxEntries, 2) + 1; Entries = bits != 1 ? buf.ReadUBits(bits) : buf.ReadUBits(1); var length = buf.ReadBits(20); UserDataFixedSize = buf.ReadBoolean(); UserDataSize = (UserDataFixedSize) ? buf.ReadBits(12) : 0; UserDataSizeBits = (UserDataFixedSize) ? buf.ReadBits(4) : 0; Flags = buf.ReadBits(demo.Protocol == 4 ? 2 : 1); buf.SeekBits(length); return(Task.CompletedTask); }
public override Task Read(SourceBufferReader buf, SourceDemo demo) { buf.SeekBits((int)buf.ReadUBits(11)); return(Task.CompletedTask); }