Пример #1
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt16((short)Angle.X);
     buf.WriteInt16((short)Angle.Y);
     buf.WriteInt16((short)Angle.Z);
     return(Task.CompletedTask);
 }
Пример #2
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt32(Tick);
     buf.WriteInt16(HostFrameTime);
     buf.WriteInt16(HostFrameTimeStdDeviation);
     return(Task.CompletedTask);
 }
Пример #3
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt16(MenuType);
     buf.WriteInt32(Data.Length);
     buf.WriteBytes(Data);
     return(Task.CompletedTask);
 }
Пример #4
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt16(Protocol);
     buf.WriteInt32(ServerCount);
     buf.WriteBoolean(IsHltv);
     buf.WriteBoolean(IsDedicated);
     buf.WriteInt32(ClientCrc);
     buf.WriteUInt16(MaxClasses);
     buf.WriteInt32(MapCrc);
     buf.WriteByte(PlayerSlot);
     buf.WriteByte(MaxClients);
     if (Unk.HasValue)
     {
         if (demo.Protocol == 4)
         {
             buf.WriteInt32(Unk.Value);
         }
         else if (demo.NetworkProtocol == 24)
         {
             buf.WriteInt32(Unk.Value);
         }
     }
     buf.WriteString(GameDir.AsSpan());
     buf.WriteString(MapName.AsSpan());
     buf.WriteString(SkyName.AsSpan());
     buf.WriteString(HostName.AsSpan());
     return(Task.CompletedTask);
 }
Пример #5
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteBoolean(NeedsDecoder);
     buf.WriteInt16(Length);
     buf.WriteBytes(Data);
     return(Task.CompletedTask);
 }
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteBits(TableId, 5);
     if (NumChangedEntries.HasValue)
     {
         buf.WriteBoolean(true);
         buf.WriteInt16(NumChangedEntries.Value);
     }
     else
     {
         buf.WriteBoolean(false);
     }
     buf.WriteBits(StringData.Length, 20);
     buf.WriteBytes(StringData);
     return(Task.CompletedTask);
 }
Пример #7
0
        public override Task Write(SourceBufferWriter buf, SourceDemo demo)
        {
            var length = (short)ServerClasses.Count;

            buf.WriteInt16(length);
            buf.WriteBoolean(CreateOnClient);
            if (!CreateOnClient)
            {
                foreach (var sclass in ServerClasses)
                {
                    --length;
                    buf.WriteBits(sclass.ClassId, (int)System.Math.Log(length, 2) + 1);
                    buf.WriteString(sclass.ClassName.AsSpan());
                    buf.WriteString(sclass.DataTableName.AsSpan());
                }
            }
            return(Task.CompletedTask);
        }