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); }
public override Task Write(SourceBufferWriter buf, SourceDemo demo) { buf.WriteByte(FromClient); buf.WriteByte(Proximity); buf.WriteUInt16(Length); buf.WriteBytes(Data); return(Task.CompletedTask); }
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); }