Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     buf.SeekBits((int)buf.ReadUBits(11));
     return(Task.CompletedTask);
 }