Beispiel #1
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);
 }
Beispiel #2
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt16(MenuType);
     buf.WriteInt32(Data.Length);
     buf.WriteBytes(Data);
     return(Task.CompletedTask);
 }
Beispiel #3
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt32(Tick);
     buf.WriteInt16(HostFrameTime);
     buf.WriteInt16(HostFrameTimeStdDeviation);
     return(Task.CompletedTask);
 }
Beispiel #4
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteByte(SignonState);
     buf.WriteInt32(SpawnCount);
     if (demo.Protocol == 4)
     {
         buf.WriteInt32(NumServerPlayers);
         if (PlayerNetworkIds.Length > 0)
         {
             buf.WriteInt32(PlayerNetworkIds.Length);
             buf.WriteBytes(PlayerNetworkIds);
         }
         if (MapName.Length > 0)
         {
             buf.WriteInt32(MapName.Length);
             buf.WriteString(MapName.AsSpan());
         }
     }
     return(Task.CompletedTask);
 }
Beispiel #5
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteBits(MaxEntries, 11);
     buf.WriteBoolean(IsDelta);
     if (IsDelta)
     {
         buf.WriteInt32(DeltaFrom);
     }
     buf.WriteBoolean(BaseLine);
     buf.WriteBits(UpdatedEntries, 11);
     buf.WriteBits(Data.Length, 20);
     buf.WriteBoolean(UpdateBaseline);
     buf.WriteBytes(Data);
     return(Task.CompletedTask);
 }
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt32(Cookie);
     buf.WriteString(CvarName.AsSpan());
     return(Task.CompletedTask);
 }
Beispiel #7
0
 public override Task Write(SourceBufferWriter buf, SourceDemo demo)
 {
     buf.WriteInt32(Slot);
     return(Task.CompletedTask);
 }