1 //====== Copyright (c) 2013, Valve Corporation, All rights reserved. ========//
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met:
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.
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 //===========================================================================//
25 // Purpose: The file defines our Google Protocol Buffers which are used in over
26 // the wire messages for the Source engine.
28 //=============================================================================
30 // We care more about speed than code size
31 option optimize_for = SPEED;
33 // We don't use the service generation functionality
34 option cc_generic_services = false;
40 // Use CamelCase CMsgMyMessageName style names for messages.
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.
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.
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.
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
59 import "google/protobuf/descriptor.proto";
61 // for CMsgVector, etc.
62 import "netmessages_public.proto";
64 import "cstrike15_gcmessages.proto";
65 //=============================================================================
66 // CStrike15 User Messages
67 //=============================================================================
69 enum ECstrike15UserMessages {
83 CS_UM_CloseCaption = 15;
84 CS_UM_CloseCaptionDirect = 16;
88 CS_UM_RequestState = 20;
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;
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;
109 CS_UM_CallVoteFailed = 45;
110 CS_UM_VoteStart = 46;
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;
120 CS_UM_AmmoDenied = 56;
121 CS_UM_MarkAchievement = 57;
122 CS_UM_MatchStatsUpdate = 58;
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;
130 CS_UM_QuestProgress = 66;
131 CS_UM_ScoreLeaderboardData = 67;
134 message CCSUsrMsg_VGUIMenu {
136 optional string name = 1;
137 optional string str = 2;
140 optional string name = 1;
141 optional bool show = 2;
142 repeated .CCSUsrMsg_VGUIMenu.Subkey subkeys = 3;
145 message CCSUsrMsg_Geiger {
146 optional int32 range = 1;
149 message CCSUsrMsg_Train {
150 optional int32 train = 1;
153 message CCSUsrMsg_HudText {
154 optional string text = 1;
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;
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;
172 message CCSUsrMsg_TextMsg {
173 optional int32 msg_dst = 1;
174 repeated string params = 3;
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;
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;
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;
204 message CCSUsrMsg_Rumble {
205 optional int32 index = 1;
206 optional int32 data = 2;
207 optional int32 flags = 3;
210 message CCSUsrMsg_CloseCaption {
211 optional uint32 hash = 1;
212 optional int32 duration = 2;
213 optional bool from_player = 3;
216 message CCSUsrMsg_CloseCaptionDirect {
217 optional uint32 hash = 1;
218 optional int32 duration = 2;
219 optional bool from_player = 3;
222 message CCSUsrMsg_SendAudio {
223 optional string radio_sound = 1;
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;
233 message CCSUsrMsg_VoiceMask {
235 optional int32 game_rules_mask = 1;
236 optional int32 ban_masks = 2;
239 repeated .CCSUsrMsg_VoiceMask.PlayerMask player_masks = 1;
240 optional bool player_mod_enable = 2;
243 message CCSUsrMsg_Damage {
244 optional int32 amount = 1;
245 optional CMsgVector inflictor_world_pos = 2;
246 optional int32 victim_entindex = 3;
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;
256 message CCSUsrMsg_HintText {
257 optional string text = 1;
260 message CCSUsrMsg_KeyHintText {
261 repeated string hints = 1;
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;
277 optional bool new_update = 1;
278 repeated .CCSUsrMsg_ProcessSpottedEntityUpdate.SpottedEntityUpdate entity_updates = 2;
281 message CCSUsrMsg_SendPlayerItemDrops {
282 repeated .CEconItemPreviewDataBlock entity_updates = 1;
285 message CCSUsrMsg_SendPlayerItemFound {
286 optional CEconItemPreviewDataBlock iteminfo = 1;
287 optional int32 entindex = 2;
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;
298 message CCSUsrMsg_AdjustMoney {
299 optional int32 amount = 1;
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;
309 message CCSUsrMsg_KillCam {
310 optional int32 obs_mode = 1;
311 optional int32 first_target = 2;
312 optional int32 second_target = 3;
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;
322 message CCSUsrMsg_CurrentTimescale {
323 optional float cur_timescale = 1;
326 message CCSUsrMsg_AchievementEvent {
327 optional int32 achievement = 1;
328 optional int32 count = 2;
329 optional int32 user_id = 3;
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;
339 message CCSUsrMsg_PlayerStatsUpdate {
341 optional int32 idx = 1;
342 optional int32 delta = 2;
345 optional int32 version = 1;
346 repeated .CCSUsrMsg_PlayerStatsUpdate.Stat stats = 4;
347 optional int32 user_id = 5;
348 optional int32 crc = 6;
351 message CCSUsrMsg_DisplayInventory {
352 optional bool display = 1;
353 optional int32 user_id = 2;
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;
363 message CCSUsrMsg_ScoreLeaderboardData {
364 optional ScoreLeaderboardData data = 1;
367 message CCSUsrMsg_XRankGet {
368 optional int32 mode_idx = 1;
369 optional int32 controller = 2;
372 message CCSUsrMsg_XRankUpd {
373 optional int32 mode_idx = 1;
374 optional int32 controller = 2;
375 optional int32 ranking = 3;
378 message CCSUsrMsg_CallVoteFailed {
379 optional int32 reason = 1;
380 optional int32 time = 2;
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;
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;
400 message CCSUsrMsg_VoteFailed {
401 optional int32 team = 1;
402 optional int32 reason = 2;
405 message CCSUsrMsg_VoteSetup {
406 repeated string potential_issues = 1;
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;
416 message CCSUsrMsg_ServerRankUpdate {
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;
425 repeated .CCSUsrMsg_ServerRankUpdate.RankUpdate rank_update = 1;
428 message CCSUsrMsg_XpUpdate {
429 optional CMsgGCCstrike15_v2_GC2ServerNotifyXPRewarded data = 1;
432 message CCSUsrMsg_ItemPickup {
433 optional string item = 1;
436 message CCSUsrMsg_ShowMenu {
437 optional int32 bits_valid_slots = 1;
438 optional int32 display_time = 2;
439 optional string menu_string = 3;
442 message CCSUsrMsg_BarTime {
443 optional string time = 1;
446 message CCSUsrMsg_AmmoDenied {
447 optional int32 ammoIdx = 1;
450 message CCSUsrMsg_MarkAchievement {
451 optional string achievement = 1;
454 message CCSUsrMsg_MatchStatsUpdate {
455 optional string update = 1;
458 message CCSUsrMsg_ItemDrop {
459 optional int64 itemid = 1;
460 optional bool death = 2;
463 message CCSUsrMsg_GlowPropTurnOff {
464 optional int32 entidx = 1;
467 message CCSUsrMsg_RoundBackupFilenames {
468 optional int32 count = 1;
469 optional int32 index = 2;
470 optional string filename = 3;
471 optional string nicename = 4;
474 message CCSUsrMsg_ResetHud {
475 optional bool reset = 1;
478 message CCSUsrMsg_GameTitle {
479 optional int32 dummy = 1;
482 message CCSUsrMsg_RequestState {
483 optional int32 dummy = 1;
486 message CCSUsrMsg_StopSpectatorMode {
487 optional int32 dummy = 1;
490 message CCSUsrMsg_DisconnectToLobby {
491 optional int32 dummy = 1;
494 message CCSUsrMsg_WarmupHasEnded {
495 optional int32 dummy = 1;
498 message CCSUsrMsg_ClientInfo {
499 optional int32 dummy = 1;
502 message CCSUsrMsg_ServerRankRevealAll {
503 optional int32 seconds_till_shutdown = 1;