예제 #1
0
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     Protocol    = buf.ReadInt16();
     ServerCount = buf.ReadInt32();
     IsHltv      = buf.ReadBoolean();
     IsDedicated = buf.ReadBoolean();
     ClientCrc   = buf.ReadInt32();
     MaxClasses  = buf.ReadUInt16();
     MapCrc      = buf.ReadInt32();
     PlayerSlot  = buf.ReadByte();
     MaxClients  = buf.ReadByte();
     if (demo.Protocol == 4)
     {
         Unk = buf.ReadInt32();
     }
     else if (demo.NetworkProtocol == 24)
     {
         Unk = buf.ReadBits(96);
     }
     TickInterval    = buf.ReadSingle();
     OperatingSystem = buf.ReadChar();
     GameDir         = buf.ReadString();
     MapName         = buf.ReadString();
     SkyName         = buf.ReadString();
     HostName        = buf.ReadString();
     return(Task.CompletedTask);
 }
예제 #2
0
        public override Task Read(SourceBufferReader buf, SourceDemo demo)
        {
            var size = buf.ReadBits(8);

            while (size-- != 0)
            {
                ConVars.Add(new ConVar()
                {
                    Name  = buf.ReadString(),
                    Value = buf.ReadString()
                });
            }
            return(Task.CompletedTask);
        }
예제 #3
0
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     TransferId    = buf.ReadUInt32();
     FileName      = buf.ReadString();
     FileRequested = buf.ReadBoolean();
     return(Task.CompletedTask);
 }
예제 #4
0
        public override Task Read(SourceBufferReader buf, SourceDemo demo)
        {
            var length = buf.ReadInt16();

            CreateOnClient = buf.ReadBoolean();
            if (!CreateOnClient)
            {
                while (length-- > 0)
                {
                    ServerClasses.Add(new ServerClassInfo()
                    {
                        ClassId       = (short)buf.ReadBits((int)System.Math.Log(length, 2) + 1),
                        ClassName     = buf.ReadString(),
                        DataTableName = buf.ReadString()
                    });
                }
            }
            return(Task.CompletedTask);
        }
예제 #5
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);
        }
예제 #6
0
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     SignonState = buf.ReadByte();
     SpawnCount  = buf.ReadInt32();
     if (demo.Protocol == 4)
     {
         NumServerPlayers = buf.ReadInt32();
         var length = buf.ReadInt32();
         if (length > 0)
         {
             PlayerNetworkIds = buf.ReadBytes(length);
         }
         length = buf.ReadInt32();
         if (length > 0)
         {
             MapName = buf.ReadString(length);
         }
     }
     return(Task.CompletedTask);
 }
예제 #7
0
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     Message = buf.ReadString();
     return(Task.CompletedTask);
 }
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     Cookie   = buf.ReadInt32();
     CvarName = buf.ReadString();
     return(Task.CompletedTask);
 }
예제 #9
0
 public override Task Read(SourceBufferReader buf, SourceDemo demo)
 {
     VoiceCodec = buf.ReadString();
     Quality    = buf.ReadByte();
     return(Task.CompletedTask);
 }