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); }
public override Task Read(SourceBufferReader buf, SourceDemo demo) { FromClient = buf.ReadByte(); Proximity = buf.ReadByte(); Length = buf.ReadUInt16(); buf.SeekBits(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); }