957a00a7b2af537d44668869d51d6ee45fa6c7a6
[henge/webcc.git] / src / proto / cstrike15_usermessages_public.proto
1 //====== Copyright (c) 2013, Valve Corporation, All rights reserved. ========//
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met:
5 //
6 // Redistributions of source code must retain the above copyright notice, this
7 // list of conditions and the following disclaimer.
8 // Redistributions in binary form must reproduce the above copyright notice,
9 // this list of conditions and the following disclaimer in the documentation
10 // and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
13 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
16 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
18 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
19 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
22 // THE POSSIBILITY OF SUCH DAMAGE.
23 //===========================================================================//
24 //
25 // Purpose: The file defines our Google Protocol Buffers which are used in over
26 // the wire messages for the Source engine.
27 //
28 //=============================================================================
29
30 // We care more about speed than code size
31 option optimize_for = SPEED;
32
33 // We don't use the service generation functionality
34 option cc_generic_services = false;
35
36
37 //
38 // STYLE NOTES:
39 //
40 // Use CamelCase CMsgMyMessageName style names for messages.
41 //
42 // Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
43 // but plays nice with the Google formatted code generation.
44 //
45 // Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
46 // Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
47 // your message and wants to remove or rename fields.
48 //
49 // Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
50 // going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
51 // than 2^56 as it will safe space on the wire in those cases.
52 //
53 // Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
54 // 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
55 // An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
56 // time.
57 //
58
59 import "google/protobuf/descriptor.proto";
60
61 // for CMsgVector, etc.
62 import "netmessages_public.proto";
63
64 import "cstrike15_gcmessages.proto";
65 //=============================================================================
66 // CStrike15 User Messages
67 //=============================================================================
68
69 enum ECstrike15UserMessages {
70 CS_UM_VGUIMenu = 1;
71 CS_UM_Geiger = 2;
72 CS_UM_Train = 3;
73 CS_UM_HudText = 4;
74 CS_UM_SayText = 5;
75 CS_UM_SayText2 = 6;
76 CS_UM_TextMsg = 7;
77 CS_UM_HudMsg = 8;
78 CS_UM_ResetHud = 9;
79 CS_UM_GameTitle = 10;
80 CS_UM_Shake = 12;
81 CS_UM_Fade = 13;
82 CS_UM_Rumble = 14;
83 CS_UM_CloseCaption = 15;
84 CS_UM_CloseCaptionDirect = 16;
85 CS_UM_SendAudio = 17;
86 CS_UM_RawAudio = 18;
87 CS_UM_VoiceMask = 19;
88 CS_UM_RequestState = 20;
89 CS_UM_Damage = 21;
90 CS_UM_RadioText = 22;
91 CS_UM_HintText = 23;
92 CS_UM_KeyHintText = 24;
93 CS_UM_ProcessSpottedEntityUpdate = 25;
94 CS_UM_ReloadEffect = 26;
95 CS_UM_AdjustMoney = 27;
96 CS_UM_StopSpectatorMode = 29;
97 CS_UM_KillCam = 30;
98 CS_UM_DesiredTimescale = 31;
99 CS_UM_CurrentTimescale = 32;
100 CS_UM_AchievementEvent = 33;
101 CS_UM_MatchEndConditions = 34;
102 CS_UM_DisconnectToLobby = 35;
103 CS_UM_PlayerStatsUpdate = 36;
104 CS_UM_DisplayInventory = 37;
105 CS_UM_WarmupHasEnded = 38;
106 CS_UM_ClientInfo = 39;
107 CS_UM_XRankGet = 40;
108 CS_UM_XRankUpd = 41;
109 CS_UM_CallVoteFailed = 45;
110 CS_UM_VoteStart = 46;
111 CS_UM_VotePass = 47;
112 CS_UM_VoteFailed = 48;
113 CS_UM_VoteSetup = 49;
114 CS_UM_ServerRankRevealAll = 50;
115 CS_UM_SendLastKillerDamageToClient = 51;
116 CS_UM_ServerRankUpdate = 52;
117 CS_UM_ItemPickup = 53;
118 CS_UM_ShowMenu = 54;
119 CS_UM_BarTime = 55;
120 CS_UM_AmmoDenied = 56;
121 CS_UM_MarkAchievement = 57;
122 CS_UM_MatchStatsUpdate = 58;
123 CS_UM_ItemDrop = 59;
124 CS_UM_GlowPropTurnOff = 60;
125 CS_UM_SendPlayerItemDrops = 61;
126 CS_UM_RoundBackupFilenames = 62;
127 CS_UM_SendPlayerItemFound = 63;
128 CS_UM_ReportHit = 64;
129 CS_UM_XpUpdate = 65;
130 CS_UM_QuestProgress = 66;
131 CS_UM_ScoreLeaderboardData = 67;
132 }
133
134 message CCSUsrMsg_VGUIMenu {
135 message Subkey {
136 optional string name = 1;
137 optional string str = 2;
138 }
139
140 optional string name = 1;
141 optional bool show = 2;
142 repeated .CCSUsrMsg_VGUIMenu.Subkey subkeys = 3;
143 }
144
145 message CCSUsrMsg_Geiger {
146 optional int32 range = 1;
147 }
148
149 message CCSUsrMsg_Train {
150 optional int32 train = 1;
151 }
152
153 message CCSUsrMsg_HudText {
154 optional string text = 1;
155 }
156
157 message CCSUsrMsg_SayText {
158 optional int32 ent_idx = 1;
159 optional string text = 2;
160 optional bool chat = 3;
161 optional bool textallchat = 4;
162 }
163
164 message CCSUsrMsg_SayText2 {
165 optional int32 ent_idx = 1;
166 optional bool chat = 2;
167 optional string msg_name = 3;
168 repeated string params = 4;
169 optional bool textallchat = 5;
170 }
171
172 message CCSUsrMsg_TextMsg {
173 optional int32 msg_dst = 1;
174 repeated string params = 3;
175 }
176
177 message CCSUsrMsg_HudMsg {
178 optional int32 channel = 1;
179 optional CMsgVector2D pos = 2;
180 optional CMsgRGBA clr1 = 3;
181 optional CMsgRGBA clr2 = 4;
182 optional int32 effect = 5;
183 optional float fade_in_time = 6;
184 optional float fade_out_time = 7;
185 optional float hold_time = 9;
186 optional float fx_time = 10;
187 optional string text = 11;
188 }
189
190 message CCSUsrMsg_Shake {
191 optional int32 command = 1;
192 optional float local_amplitude = 2;
193 optional float frequency = 3;
194 optional float duration = 4;
195 }
196
197 message CCSUsrMsg_Fade {
198 optional int32 duration = 1;
199 optional int32 hold_time = 2;
200 optional int32 flags = 3;
201 optional CMsgRGBA clr = 4;
202 }
203
204 message CCSUsrMsg_Rumble {
205 optional int32 index = 1;
206 optional int32 data = 2;
207 optional int32 flags = 3;
208 }
209
210 message CCSUsrMsg_CloseCaption {
211 optional uint32 hash = 1;
212 optional int32 duration = 2;
213 optional bool from_player = 3;
214 }
215
216 message CCSUsrMsg_CloseCaptionDirect {
217 optional uint32 hash = 1;
218 optional int32 duration = 2;
219 optional bool from_player = 3;
220 }
221
222 message CCSUsrMsg_SendAudio {
223 optional string radio_sound = 1;
224 }
225
226 message CCSUsrMsg_RawAudio {
227 optional int32 pitch = 1;
228 optional int32 entidx = 2;
229 optional float duration = 3;
230 optional string voice_filename = 4;
231 }
232
233 message CCSUsrMsg_VoiceMask {
234 message PlayerMask {
235 optional int32 game_rules_mask = 1;
236 optional int32 ban_masks = 2;
237 }
238
239 repeated .CCSUsrMsg_VoiceMask.PlayerMask player_masks = 1;
240 optional bool player_mod_enable = 2;
241 }
242
243 message CCSUsrMsg_Damage {
244 optional int32 amount = 1;
245 optional CMsgVector inflictor_world_pos = 2;
246 optional int32 victim_entindex = 3;
247 }
248
249 message CCSUsrMsg_RadioText {
250 optional int32 msg_dst = 1;
251 optional int32 client = 2;
252 optional string msg_name = 3;
253 repeated string params = 4;
254 }
255
256 message CCSUsrMsg_HintText {
257 optional string text = 1;
258 }
259
260 message CCSUsrMsg_KeyHintText {
261 repeated string hints = 1;
262 }
263
264 message CCSUsrMsg_ProcessSpottedEntityUpdate {
265 message SpottedEntityUpdate {
266 optional int32 entity_idx = 1;
267 optional int32 class_id = 2;
268 optional int32 origin_x = 3;
269 optional int32 origin_y = 4;
270 optional int32 origin_z = 5;
271 optional int32 angle_y = 6;
272 optional bool defuser = 7;
273 optional bool player_has_defuser = 8;
274 optional bool player_has_c4 = 9;
275 }
276
277 optional bool new_update = 1;
278 repeated .CCSUsrMsg_ProcessSpottedEntityUpdate.SpottedEntityUpdate entity_updates = 2;
279 }
280
281 message CCSUsrMsg_SendPlayerItemDrops {
282 repeated .CEconItemPreviewDataBlock entity_updates = 1;
283 }
284
285 message CCSUsrMsg_SendPlayerItemFound {
286 optional CEconItemPreviewDataBlock iteminfo = 1;
287 optional int32 entindex = 2;
288 }
289
290 message CCSUsrMsg_ReloadEffect {
291 optional int32 entidx = 1;
292 optional int32 actanim = 2;
293 optional float origin_x = 3;
294 optional float origin_y = 4;
295 optional float origin_z = 5;
296 }
297
298 message CCSUsrMsg_AdjustMoney {
299 optional int32 amount = 1;
300 }
301
302 message CCSUsrMsg_ReportHit {
303 optional float pos_x = 1;
304 optional float pos_y = 2;
305 optional float timestamp = 4;
306 optional float pos_z = 3;
307 }
308
309 message CCSUsrMsg_KillCam {
310 optional int32 obs_mode = 1;
311 optional int32 first_target = 2;
312 optional int32 second_target = 3;
313 }
314
315 message CCSUsrMsg_DesiredTimescale {
316 optional float desired_timescale = 1;
317 optional float duration_realtime_sec = 2;
318 optional int32 interpolator_type = 3;
319 optional float start_blend_time = 4;
320 }
321
322 message CCSUsrMsg_CurrentTimescale {
323 optional float cur_timescale = 1;
324 }
325
326 message CCSUsrMsg_AchievementEvent {
327 optional int32 achievement = 1;
328 optional int32 count = 2;
329 optional int32 user_id = 3;
330 }
331
332 message CCSUsrMsg_MatchEndConditions {
333 optional int32 fraglimit = 1;
334 optional int32 mp_maxrounds = 2;
335 optional int32 mp_winlimit = 3;
336 optional int32 mp_timelimit = 4;
337 }
338
339 message CCSUsrMsg_PlayerStatsUpdate {
340 message Stat {
341 optional int32 idx = 1;
342 optional int32 delta = 2;
343 }
344
345 optional int32 version = 1;
346 repeated .CCSUsrMsg_PlayerStatsUpdate.Stat stats = 4;
347 optional int32 user_id = 5;
348 optional int32 crc = 6;
349 }
350
351 message CCSUsrMsg_DisplayInventory {
352 optional bool display = 1;
353 optional int32 user_id = 2;
354 }
355
356 message CCSUsrMsg_QuestProgress {
357 optional uint32 quest_id = 1;
358 optional uint32 normal_points = 2;
359 optional uint32 bonus_points = 3;
360 optional bool is_event_quest = 4;
361 }
362
363 message CCSUsrMsg_ScoreLeaderboardData {
364 optional ScoreLeaderboardData data = 1;
365 }
366
367 message CCSUsrMsg_XRankGet {
368 optional int32 mode_idx = 1;
369 optional int32 controller = 2;
370 }
371
372 message CCSUsrMsg_XRankUpd {
373 optional int32 mode_idx = 1;
374 optional int32 controller = 2;
375 optional int32 ranking = 3;
376 }
377
378 message CCSUsrMsg_CallVoteFailed {
379 optional int32 reason = 1;
380 optional int32 time = 2;
381 }
382
383 message CCSUsrMsg_VoteStart {
384 optional int32 team = 1;
385 optional int32 ent_idx = 2;
386 optional int32 vote_type = 3;
387 optional string disp_str = 4;
388 optional string details_str = 5;
389 optional string other_team_str = 6;
390 optional bool is_yes_no_vote = 7;
391 }
392
393 message CCSUsrMsg_VotePass {
394 optional int32 team = 1;
395 optional int32 vote_type = 2;
396 optional string disp_str = 3;
397 optional string details_str = 4;
398 }
399
400 message CCSUsrMsg_VoteFailed {
401 optional int32 team = 1;
402 optional int32 reason = 2;
403 }
404
405 message CCSUsrMsg_VoteSetup {
406 repeated string potential_issues = 1;
407 }
408
409 message CCSUsrMsg_SendLastKillerDamageToClient {
410 optional int32 num_hits_given = 1;
411 optional int32 damage_given = 2;
412 optional int32 num_hits_taken = 3;
413 optional int32 damage_taken = 4;
414 }
415
416 message CCSUsrMsg_ServerRankUpdate {
417 message RankUpdate {
418 optional int32 account_id = 1;
419 optional int32 rank_old = 2;
420 optional int32 rank_new = 3;
421 optional int32 num_wins = 4;
422 optional float rank_change = 5;
423 }
424
425 repeated .CCSUsrMsg_ServerRankUpdate.RankUpdate rank_update = 1;
426 }
427
428 message CCSUsrMsg_XpUpdate {
429 optional CMsgGCCstrike15_v2_GC2ServerNotifyXPRewarded data = 1;
430 }
431
432 message CCSUsrMsg_ItemPickup {
433 optional string item = 1;
434 }
435
436 message CCSUsrMsg_ShowMenu {
437 optional int32 bits_valid_slots = 1;
438 optional int32 display_time = 2;
439 optional string menu_string = 3;
440 }
441
442 message CCSUsrMsg_BarTime {
443 optional string time = 1;
444 }
445
446 message CCSUsrMsg_AmmoDenied {
447 optional int32 ammoIdx = 1;
448 }
449
450 message CCSUsrMsg_MarkAchievement {
451 optional string achievement = 1;
452 }
453
454 message CCSUsrMsg_MatchStatsUpdate {
455 optional string update = 1;
456 }
457
458 message CCSUsrMsg_ItemDrop {
459 optional int64 itemid = 1;
460 optional bool death = 2;
461 }
462
463 message CCSUsrMsg_GlowPropTurnOff {
464 optional int32 entidx = 1;
465 }
466
467 message CCSUsrMsg_RoundBackupFilenames {
468 optional int32 count = 1;
469 optional int32 index = 2;
470 optional string filename = 3;
471 optional string nicename = 4;
472 }
473
474 message CCSUsrMsg_ResetHud {
475 optional bool reset = 1;
476 }
477
478 message CCSUsrMsg_GameTitle {
479 optional int32 dummy = 1;
480 }
481
482 message CCSUsrMsg_RequestState {
483 optional int32 dummy = 1;
484 }
485
486 message CCSUsrMsg_StopSpectatorMode {
487 optional int32 dummy = 1;
488 }
489
490 message CCSUsrMsg_DisconnectToLobby {
491 optional int32 dummy = 1;
492 }
493
494 message CCSUsrMsg_WarmupHasEnded {
495 optional int32 dummy = 1;
496 }
497
498 message CCSUsrMsg_ClientInfo {
499 optional int32 dummy = 1;
500 }
501
502 message CCSUsrMsg_ServerRankRevealAll {
503 optional int32 seconds_till_shutdown = 1;
504 }
505
506