source_demo_tool/demo_file/packet/
netmessage.rs

1use source_demo_tool_impl_proc_macros::declare_protobuf_messages;
2
3declare_protobuf_messages!(Net, {
4    Tick = 4 {
5                         current_tick: VarInt = 1,
6                host_computation_time: VarInt = 4,
7             host_computation_std_dev: VarInt = 5,
8        host_frame_start_time_std_dev: VarInt = 6,
9    },
10    StringCmd = 5 {
11        command: String = 1,
12    },
13    SetConVar = 6 {
14        ConVars: Proto = 1 {
15            repeated ConvarsInner: Proto = 1 {
16                optional name: String = 1,
17                        value: String = 2,
18                optional   v3: VarInt = 3,
19            },
20        },
21    },
22    SignOnState = 7 {
23              signon_state: VarInt = 1,
24               spawn_count: VarInt = 2,
25        num_server_players: VarInt = 3,
26    },
27    ServerInfo = 8 {
28                protocol:  VarInt =  1,
29         server_restarts:  VarInt =  2,
30            is_dedicated:  VarInt =  3,
31                 is_hltv:  VarInt =  5,
32                      os:  VarInt =  7,
33                 map_crc: Fixed32 =  8,
34              client_crc: Fixed32 =  9,
35        string_table_crc: Fixed32 = 10,
36             max_clients:  VarInt = 11,
37             max_classes:  VarInt = 12,
38             player_slot:  VarInt = 13,
39           tick_interval: Float32 = 14,
40                game_dir:  String = 15,
41                map_name:  String = 16,
42          map_group_name:  String = 17,
43                sky_name:  String = 18,
44               host_name:  String = 19,
45               unknown21:  VarInt = 21,
46              ugc_map_id:  VarInt = 22,
47        optional     v23:  VarInt = 23,
48    },
49    SendTable = 9 {
50                is_end: VarInt = 1,
51        net_table_name: String = 2,
52         needs_decoder: VarInt = 3,
53        repeated SendProp:  Proto = 4 {
54            sendprop_type:  VarInt = 1,
55                 var_name:  String = 2,
56                    flags:  VarInt = 3,
57                 priority:  VarInt = 4,
58                  dt_name:  String = 5,
59             num_elements:  VarInt = 6,
60                low_value: Fixed32 = 7,
61               high_value: Fixed32 = 8,
62                 num_bits:  VarInt = 9,
63        }
64    },
65    ClassInfo = 10 {
66        is_create_on_client: VarInt = 1,
67    },
68    CreateStringTable = 12 {
69                           name: String = 1,
70                    max_entries: VarInt = 2,
71                    num_entries: VarInt = 3,
72        is_user_data_fixed_size: VarInt = 4,
73                 user_data_size: VarInt = 5,
74            user_data_size_bits: VarInt = 6,
75                          flags: VarInt = 7,
76                    string_data: Length = 8,
77    },
78    UpdateStringTable = 13 {
79                   table_id: VarInt = 1,
80        num_changed_entries: VarInt = 2,
81                string_data: Length = 3,
82
83    },
84    VoiceInit = 14 {
85        quality: VarInt = 1,
86          codec: String = 2,
87        version: VarInt = 3,
88    },
89    Sounds = 17 {
90        reliable_sound: VarInt = 1,
91        repeated SoundsInner: Proto = 2 {
92            optional         origin_x:  VarInt =  1,
93            optional         origin_y:  VarInt =  2,
94            optional         origin_z:  VarInt =  3,
95            optional           volume:  VarInt =  4,
96            optional  sequence_number:  VarInt =  6,
97            optional     entity_index:  VarInt =  7,
98            optional          channel:  VarInt =  8,
99            optional            pitch:  VarInt =  9,
100            optional            flags:  VarInt = 10,
101            optional        sound_num:  VarInt = 11,
102            optional sound_num_handle: Fixed32 = 12,
103            optional      random_seed:  VarInt = 14,
104            optional      sound_level:  VarInt = 15,
105            optional       is_ambient:  VarInt = 17,
106        },
107    },
108    SetView = 18 {
109        entity_index: VarInt = 1,
110    },
111    BspDecal = 21 {
112        BspDecalPos: Proto = 1 {
113            _x: Float32 = 1,
114            _y: Float32 = 2,
115            _z: Float32 = 3,
116        },
117          texture_index: VarInt = 2,
118           entity_index: VarInt = 3,
119            model_index: VarInt = 4,
120        is_low_priority: VarInt = 5,
121    },
122    UserMessage = 23 {
123        msg_type: VarInt = 1,
124        msg_data: Length = 2,
125    },
126    GameEvent = 25 {
127        event_id: VarInt = 2,
128        optional repeated GameEventKeys: Proto = 3 {
129                       val_type:  VarInt = 1,
130            optional val_string:  String = 2,
131            optional  val_float: Float32 = 3,
132            optional   val_long:  VarInt = 4,
133            optional  val_short:  VarInt = 5,
134            optional   val_byte:  VarInt = 6,
135            optional   val_bool:  VarInt = 7,
136        }
137    },
138    PacketEntity = 26 {
139                max_entries: VarInt = 1,
140            updated_entries: VarInt = 2,
141                   is_delta: VarInt = 3,
142            update_baseline: VarInt = 4,
143                   baseline: VarInt = 5,
144        optional delta_from: VarInt = 6,
145                entity_data: Length = 7
146    },
147    TempEntities = 27 {
148        optional reliable: VarInt = 1,
149              num_entries: VarInt = 2,
150              entity_data: Length = 3,
151    },
152    Prefetch = 28 {
153        sound_index: VarInt = 1,
154    },
155    GameEventList = 30 {
156        repeated Descriptors: Proto = 1 {
157            event_id: VarInt = 1,
158                name: String = 2,
159            optional repeated DescriptorKeys: Proto = 3 {
160                key_type: VarInt = 1,
161                key_name: String = 2,
162            },
163        },
164    },
165    AvatarData = 100 {
166        account_id: VarInt = 1,
167         rgb_bytes: Length = 2,
168    },
169});