Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

674 lines
21 KiB

  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. // Note about encoding:
  30. // http://code.google.com/apis/protocolbuffers/docs/encoding.html
  31. //
  32. // TL;DR: Use sint32/sint64 for values that may be negative.
  33. //
  34. // There is an important difference between the signed int types (sint32 and sint64)
  35. // and the "standard" int types (int32 and int64) when it comes to encoding negative
  36. // numbers. If you use int32 or int64 as the type for a negative number, the
  37. // resulting varint is always ten bytes long � it is, effectively, treated like a
  38. // very large unsigned integer. If you use one of the signed types, the resulting
  39. // varint uses ZigZag encoding, which is much more efficient.
  40. // Commenting this out allows it to be compiled for SPEED or LITE_RUNTIME.
  41. // option optimize_for = SPEED;
  42. // We don't use the service generation functionality
  43. option cc_generic_services = false;
  44. //
  45. // STYLE NOTES:
  46. //
  47. // Use CamelCase CMsgMyMessageName style names for messages.
  48. //
  49. // Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
  50. // but plays nice with the Google formatted code generation.
  51. //
  52. // Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
  53. // Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
  54. // your message and wants to remove or rename fields.
  55. //
  56. // Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
  57. // going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
  58. // than 2^56 as it will safe space on the wire in those cases.
  59. //
  60. // Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
  61. // 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
  62. // An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
  63. // time.
  64. //
  65. import "google/protobuf/descriptor.proto";
  66. //import "network_connection.proto"; // common types are in here
  67. //=============================================================================
  68. // Common Types
  69. //=============================================================================
  70. message CMsgVector
  71. {
  72. optional float x = 1;
  73. optional float y = 2;
  74. optional float z = 3;
  75. }
  76. message CMsgVector2D
  77. {
  78. optional float x = 1;
  79. optional float y = 2;
  80. }
  81. message CMsgQAngle
  82. {
  83. optional float x = 1;
  84. optional float y = 2;
  85. optional float z = 3;
  86. }
  87. message CMsgRGBA
  88. {
  89. optional int32 r = 1;
  90. optional int32 g = 2;
  91. optional int32 b = 3;
  92. optional int32 a = 4;
  93. }
  94. //=============================================================================
  95. // Bidirectional NET Messages
  96. //=============================================================================
  97. enum NET_Messages
  98. {
  99. net_NOP = 0;
  100. net_Disconnect = 1; // disconnect, last message in connection
  101. net_File = 2; // file transmission message request/deny
  102. net_SplitScreenUser = 3; // Changes split screen user, client and server must both provide handler
  103. net_Tick = 4; // s->c world tick, c->s ack world tick
  104. net_StringCmd = 5; // a string command
  105. net_SetConVar = 6; // sends one/multiple convar/userinfo settings
  106. net_SignonState = 7; // signals or acks current signon state
  107. // client clc messages and server svc messages use the range 8+
  108. net_PlayerAvatarData = 100; // player avatar RGB data (client clc & server svc message blocks use 8..., so start a new range here @ 100+)
  109. }
  110. message CNETMsg_Tick
  111. {
  112. optional uint32 tick = 1; // current tick count
  113. // optional uint32 host_frametime = 2; // Host frame time in 1/100000th of a second
  114. // optional uint32 host_frametime_std_deviation = 3; // Host frame time stddev in 1/100000th of a second
  115. optional uint32 host_computationtime = 4; // Host frame computation time in usec (1/1,000,000th sec) - will be say 4 ms when server is running at 25% CPU load for 64-tick server
  116. optional uint32 host_computationtime_std_deviation = 5; // Host frame computation time stddev in usec (1/1,000,000th sec)
  117. optional uint32 host_framestarttime_std_deviation = 6; // Host frame start time stddev in usec (1/1,000,000th sec) - measures how precisely we can wake up from sleep when meeting server framerate
  118. optional uint32 hltv_replay_flags = 7 ; // 0 or absent by default, 1 when hltv replay is in progress - used to fix client state in case of server crashes of full frame updates
  119. }
  120. message CNETMsg_StringCmd
  121. {
  122. optional string command = 1;
  123. }
  124. message CNETMsg_SignonState
  125. {
  126. optional uint32 signon_state = 1; // See SIGNONSTATE_ defines
  127. optional uint32 spawn_count = 2; // server spawn count (session number)
  128. optional uint32 num_server_players = 3; // Number of players the server discloses as connected to the server
  129. repeated string players_networkids = 4; // player network ids
  130. optional string map_name = 5; // Name of the current map
  131. }
  132. message CMsg_CVars
  133. {
  134. message CVar
  135. {
  136. optional string name = 1;
  137. optional string value = 2;
  138. optional uint32 dictionary_name = 3; // In order to save on connect packet size convars that are known will have their dictionary name index sent here
  139. }
  140. repeated CVar cvars = 1;
  141. }
  142. message CNETMsg_SetConVar
  143. {
  144. optional CMsg_CVars convars = 1;
  145. }
  146. message CNETMsg_NOP
  147. {
  148. }
  149. message CNETMsg_Disconnect
  150. {
  151. optional string text = 1;
  152. }
  153. message CNETMsg_File
  154. {
  155. optional int32 transfer_id = 1;
  156. optional string file_name = 2;
  157. optional bool is_replay_demo_file = 3;
  158. optional bool deny = 4;
  159. }
  160. message CNETMsg_SplitScreenUser
  161. {
  162. optional int32 slot = 1;
  163. }
  164. message CNETMsg_PlayerAvatarData
  165. { // 12 KB player avatar 64x64 rgb only no alpha
  166. // WARNING-WARNING-WARNING
  167. // This message is extremely large for our net channels
  168. // and must be pumped through special fragmented waiting list
  169. // via chunk-based ack mechanism!
  170. // See: INetChannel::EnqueueVeryLargeAsyncTransfer
  171. // WARNING-WARNING-WARNING
  172. optional uint32 accountid = 1;
  173. optional bytes rgb = 2;
  174. }
  175. //=============================================================================
  176. // Client messages
  177. //=============================================================================
  178. enum CLC_Messages
  179. {
  180. clc_ClientInfo = 8; // client info (table CRC etc)
  181. clc_Move = 9; // [CUserCmd]
  182. clc_VoiceData = 10; // Voicestream data from a client
  183. clc_BaselineAck = 11; // client acknowledges a new baseline seqnr
  184. clc_ListenEvents = 12; // client acknowledges a new baseline seqnr
  185. clc_RespondCvarValue = 13; // client is responding to a svc_GetCvarValue message.
  186. clc_FileCRCCheck = 14; // client is sending a file's CRC to the server to be verified.
  187. clc_LoadingProgress = 15; // client loading progress
  188. clc_SplitPlayerConnect = 16;
  189. clc_ClientMessage = 17;
  190. clc_CmdKeyValues = 18;
  191. clc_HltvReplay = 20;
  192. }
  193. message CCLCMsg_ClientInfo
  194. {
  195. optional fixed32 send_table_crc = 1;
  196. optional uint32 server_count = 2;
  197. optional bool is_hltv = 3;
  198. optional bool is_replay = 4;
  199. optional uint32 friends_id = 5;
  200. optional string friends_name = 6;
  201. repeated fixed32 custom_files = 7;
  202. }
  203. message CCLCMsg_Move
  204. {
  205. optional uint32 num_backup_commands = 1; // new commands = user_cmds_size() - num_backup_commands
  206. optional uint32 num_new_commands = 2;
  207. optional bytes data = 3;
  208. }
  209. enum VoiceDataFormat_t
  210. {
  211. VOICEDATA_FORMAT_STEAM = 0; // steam uses SILK
  212. VOICEDATA_FORMAT_ENGINE = 1; // was speex, switching to celt
  213. };
  214. message CCLCMsg_VoiceData
  215. {
  216. optional bytes data = 1;
  217. optional fixed64 xuid = 2;
  218. optional VoiceDataFormat_t format = 3 [default = VOICEDATA_FORMAT_ENGINE];
  219. optional int32 sequence_bytes = 4; // This is a TCP-style sequence number, so it includes the current packet length. So it's actually the offset within the compressed data stream of the next packet to follow (if any).
  220. optional uint32 section_number = 5;
  221. optional uint32 uncompressed_sample_offset = 6;
  222. }
  223. message CCLCMsg_BaselineAck
  224. {
  225. optional int32 baseline_tick = 1;
  226. optional int32 baseline_nr = 2;
  227. }
  228. message CCLCMsg_ListenEvents
  229. {
  230. repeated fixed32 event_mask = 1;
  231. }
  232. message CCLCMsg_RespondCvarValue
  233. {
  234. optional int32 cookie = 1; // QueryCvarCookie_t
  235. optional int32 status_code = 2; // EQueryCvarValueStatus
  236. optional string name = 3;
  237. optional string value = 4;
  238. }
  239. message CCLCMsg_FileCRCCheck
  240. {
  241. // See CCLCMsg_FileCRCCheck_t in netmessages.h while reading this.
  242. // Optimisation:
  243. // Do not set or get path or filename directly, use instead
  244. // CCLCMsg_FileCRCCheck_t::GetPath()
  245. // CCLCMsg_FileCRCCheck_t::GetPath()...etc..
  246. // If the path and/or filename below is one of certain commonly occuring ones
  247. // then an index is stored instead of a string. So if code_path != -1 then
  248. // path == "".
  249. optional int32 code_path = 1; // read comment above
  250. optional string path = 2; // read comment above
  251. optional int32 code_filename = 3; // read comment above
  252. optional string filename = 4; // read comment above
  253. optional int32 file_fraction = 5;
  254. optional bytes md5 = 6;
  255. optional uint32 crc = 7;
  256. optional int32 file_hash_type = 8;
  257. optional int32 file_len = 9;
  258. optional int32 pack_file_id = 10;
  259. optional int32 pack_file_number = 11;
  260. }
  261. message CCLCMsg_LoadingProgress
  262. {
  263. optional int32 progress = 1;
  264. }
  265. message CCLCMsg_SplitPlayerConnect
  266. {
  267. optional CMsg_CVars convars = 1;
  268. }
  269. message CCLCMsg_CmdKeyValues
  270. {
  271. optional bytes keyvalues = 1;
  272. }
  273. //=============================================================================
  274. // Server messages
  275. //=============================================================================
  276. enum ESplitScreenMessageType
  277. {
  278. option allow_alias = true;
  279. MSG_SPLITSCREEN_ADDUSER = 0;
  280. MSG_SPLITSCREEN_REMOVEUSER = 1;
  281. MSG_SPLITSCREEN_TYPE_BITS = 1;
  282. };
  283. enum SVC_Messages
  284. {
  285. svc_ServerInfo = 8; // first message from server about game; map etc
  286. svc_SendTable = 9; // sends a sendtable description for a game class
  287. svc_ClassInfo = 10; // Info about classes (first byte is a CLASSINFO_ define).
  288. svc_SetPause = 11; // tells client if server paused or unpaused
  289. svc_CreateStringTable = 12; // inits shared string tables
  290. svc_UpdateStringTable = 13; // updates a string table
  291. svc_VoiceInit = 14; // inits used voice codecs & quality
  292. svc_VoiceData = 15; // Voicestream data from the server
  293. svc_Print = 16; // print text to console
  294. svc_Sounds = 17; // starts playing sound
  295. svc_SetView = 18; // sets entity as point of view
  296. svc_FixAngle = 19; // sets/corrects players viewangle
  297. svc_CrosshairAngle = 20; // adjusts crosshair in auto aim mode to lock on traget
  298. svc_BSPDecal = 21; // add a static decal to the world BSP
  299. svc_SplitScreen = 22; // split screen style message
  300. svc_UserMessage = 23; // a game specific message
  301. svc_EntityMessage = 24; // a message for an entity
  302. svc_GameEvent = 25; // global game event fired
  303. svc_PacketEntities = 26; // non-delta compressed entities
  304. svc_TempEntities = 27; // non-reliable event object
  305. svc_Prefetch = 28; // only sound indices for now
  306. svc_Menu = 29; // display a menu from a plugin
  307. svc_GameEventList = 30; // list of known games events and fields
  308. svc_GetCvarValue = 31; // Server wants to know the value of a cvar on the client
  309. svc_PaintmapData = 33; // Server paintmap data
  310. svc_CmdKeyValues = 34; // Server submits KeyValues command for the client
  311. svc_EncryptedData = 35; // Server submites encrypted data
  312. svc_HltvReplay = 36; // start or stop HLTV-fed replay
  313. svc_Broadcast_Command = 38; // broadcasting a user command
  314. }
  315. message CSVCMsg_ServerInfo
  316. {
  317. optional int32 protocol = 1; // protocol version
  318. optional int32 server_count = 2; // number of changelevels since server start
  319. optional bool is_dedicated = 3; // dedicated server ?
  320. optional bool is_official_valve_server = 4;
  321. optional bool is_hltv = 5; // HLTV server ?
  322. optional bool is_replay = 6; // Replay server ?
  323. optional bool is_redirecting_to_proxy_relay = 21; // // Will be redirecting to proxy relay
  324. optional int32 c_os = 7; // L = linux, W = Win32
  325. optional fixed32 map_crc = 8; // server map CRC
  326. optional fixed32 client_crc = 9; // client.dll CRC server is using
  327. optional fixed32 string_table_crc = 10; // string table CRC server is using
  328. optional int32 max_clients = 11; // max number of clients on server
  329. optional int32 max_classes = 12; // max number of server classes
  330. optional int32 player_slot = 13; // our client slot number
  331. optional float tick_interval = 14; // server tick interval
  332. optional string game_dir = 15; // game directory eg "tf2"
  333. optional string map_name = 16; // name of current map
  334. optional string map_group_name = 17; // name of current map
  335. optional string sky_name = 18; // name of current skybox
  336. optional string host_name = 19; // server name
  337. optional uint32 public_ip = 20;
  338. optional uint64 ugc_map_id = 22;
  339. }
  340. message CSVCMsg_ClassInfo
  341. {
  342. message class_t
  343. {
  344. optional int32 class_id = 1;
  345. optional string data_table_name = 2;
  346. optional string class_name = 3;
  347. }
  348. optional bool create_on_client = 1;
  349. repeated class_t classes = 2;
  350. }
  351. message CSVCMsg_SendTable
  352. {
  353. message sendprop_t
  354. {
  355. optional int32 type = 1; // SendPropType
  356. optional string var_name = 2;
  357. optional int32 flags = 3;
  358. optional int32 priority = 4;
  359. optional string dt_name = 5; // if pProp->m_Type == DPT_DataTable || IsExcludeProp
  360. optional int32 num_elements = 6; // else if pProp->m_Type == DPT_Array
  361. optional float low_value = 7; // else ...
  362. optional float high_value = 8; // ...
  363. optional int32 num_bits = 9; // ...
  364. };
  365. optional bool is_end = 1;
  366. optional string net_table_name = 2;
  367. optional bool needs_decoder = 3;
  368. repeated sendprop_t props = 4;
  369. }
  370. message CSVCMsg_Print
  371. {
  372. optional string text = 1;
  373. }
  374. message CSVCMsg_SetPause
  375. {
  376. optional bool paused = 1;
  377. }
  378. message CSVCMsg_SetView
  379. {
  380. optional int32 entity_index = 1;
  381. }
  382. message CSVCMsg_CreateStringTable
  383. {
  384. optional string name = 1;
  385. optional int32 max_entries = 2;
  386. optional int32 num_entries = 3;
  387. optional bool user_data_fixed_size = 4;
  388. optional int32 user_data_size = 5;
  389. optional int32 user_data_size_bits = 6;
  390. optional int32 flags = 7;
  391. optional bytes string_data = 8;
  392. }
  393. message CSVCMsg_UpdateStringTable
  394. {
  395. optional int32 table_id = 1;
  396. optional int32 num_changed_entries = 2;
  397. optional bytes string_data = 3;
  398. }
  399. message CSVCMsg_VoiceInit
  400. {
  401. optional int32 quality = 1;
  402. optional string codec = 2;
  403. optional int32 version = 3 [default = 0];
  404. }
  405. message CSVCMsg_VoiceData
  406. {
  407. optional int32 client = 1;
  408. optional bool proximity = 2;
  409. optional fixed64 xuid = 3;
  410. optional int32 audible_mask = 4;
  411. optional bytes voice_data = 5;
  412. optional bool caster = 6;
  413. optional VoiceDataFormat_t format = 7 [default = VOICEDATA_FORMAT_ENGINE];
  414. optional int32 sequence_bytes = 8; // This is a TCP-style sequence number, so it includes the current packet length. So it's actually the offset within the compressed data stream of the next packet to follow (if any).
  415. optional uint32 section_number = 9;
  416. optional uint32 uncompressed_sample_offset = 10;
  417. }
  418. message CSVCMsg_FixAngle
  419. {
  420. optional bool relative = 1;
  421. optional CMsgQAngle angle = 2;
  422. }
  423. message CSVCMsg_CrosshairAngle
  424. {
  425. optional CMsgQAngle angle = 1;
  426. }
  427. message CSVCMsg_Prefetch
  428. {
  429. optional int32 sound_index = 1;
  430. }
  431. message CSVCMsg_BSPDecal
  432. {
  433. optional CMsgVector pos = 1;
  434. optional int32 decal_texture_index = 2;
  435. optional int32 entity_index = 3;
  436. optional int32 model_index = 4;
  437. optional bool low_priority = 5;
  438. }
  439. message CSVCMsg_SplitScreen
  440. {
  441. optional ESplitScreenMessageType type = 1;
  442. optional int32 slot = 2;
  443. optional int32 player_index = 3;
  444. }
  445. message CSVCMsg_GetCvarValue
  446. {
  447. optional int32 cookie = 1; // QueryCvarCookie_t
  448. optional string cvar_name = 2;
  449. }
  450. message CSVCMsg_Menu
  451. {
  452. optional int32 dialog_type = 1; // DIALOG_TYPE
  453. optional bytes menu_key_values = 2; // KeyValues.WriteAsBinary()
  454. }
  455. message CSVCMsg_UserMessage
  456. {
  457. optional int32 msg_type = 1;
  458. optional bytes msg_data = 2;
  459. optional int32 passthrough = 3;// 0 or absent = normal event; 1 = pass-through real-time event needed during replay
  460. }
  461. message CSVCMsg_PaintmapData
  462. {
  463. optional bytes paintmap = 1;
  464. }
  465. message CSVCMsg_GameEvent
  466. {
  467. message key_t
  468. {
  469. optional int32 type = 1; // type
  470. optional string val_string = 2; // TYPE_STRING
  471. optional float val_float = 3; // TYPE_FLOAT
  472. optional int32 val_long = 4; // TYPE_LONG
  473. optional int32 val_short = 5; // TYPE_SHORT
  474. optional int32 val_byte = 6; // TYPE_BYTE
  475. optional bool val_bool = 7; // TYPE_BOOL
  476. optional uint64 val_uint64 = 8; // TYPE_UINT64
  477. optional bytes val_wstring = 9; // TYPE_WSTRING
  478. }
  479. optional string event_name = 1;
  480. optional int32 eventid = 2;
  481. repeated key_t keys = 3;
  482. optional int32 passthrough = 4; // 0 or absent = normal event; 1 = pass-through real-time event needed during replay
  483. }
  484. message CSVCMsg_GameEventList
  485. {
  486. message key_t
  487. {
  488. optional int32 type = 1;
  489. optional string name = 2;
  490. };
  491. message descriptor_t
  492. {
  493. optional int32 eventid = 1;
  494. optional string name = 2;
  495. repeated key_t keys = 3;
  496. };
  497. repeated descriptor_t descriptors = 1;
  498. }
  499. message CSVCMsg_TempEntities
  500. {
  501. optional bool reliable = 1;
  502. optional int32 num_entries = 2;
  503. optional bytes entity_data = 3;
  504. }
  505. message CSVCMsg_PacketEntities
  506. {
  507. optional int32 max_entries = 1;
  508. optional int32 updated_entries = 2;
  509. optional bool is_delta = 3;
  510. optional bool update_baseline = 4;
  511. optional int32 baseline = 5;
  512. optional int32 delta_from = 6;
  513. optional bytes entity_data = 7;
  514. }
  515. message CSVCMsg_Sounds
  516. {
  517. message sounddata_t
  518. {
  519. optional sint32 origin_x = 1;
  520. optional sint32 origin_y = 2;
  521. optional sint32 origin_z = 3;
  522. optional uint32 volume = 4;
  523. optional float delay_value = 5;
  524. optional int32 sequence_number = 6;
  525. optional int32 entity_index = 7;
  526. optional int32 channel = 8;
  527. optional int32 pitch = 9;
  528. optional int32 flags = 10;
  529. optional uint32 sound_num = 11;
  530. optional fixed32 sound_num_handle = 12;
  531. optional int32 speaker_entity = 13;
  532. optional int32 random_seed = 14;
  533. optional int32 sound_level = 15; // soundlevel_t
  534. optional bool is_sentence = 16;
  535. optional bool is_ambient = 17;
  536. };
  537. optional bool reliable_sound = 1;
  538. repeated sounddata_t sounds = 2;
  539. }
  540. message CSVCMsg_EntityMsg
  541. {
  542. optional int32 ent_index = 1;
  543. optional int32 class_id = 2;
  544. optional bytes ent_data = 3;
  545. }
  546. message CSVCMsg_CmdKeyValues
  547. {
  548. optional bytes keyvalues = 1;
  549. }
  550. message CSVCMsg_EncryptedData
  551. {
  552. optional bytes encrypted = 1;
  553. optional int32 key_type = 2;
  554. }
  555. message CSVCMsg_HltvReplay
  556. {
  557. optional int32 delay = 1; // delay in ticks, 0 or abscent if replay stops
  558. optional int32 primary_target = 2; // the primary target to look at during the replay
  559. optional int32 replay_stop_at = 3; // the tick when replay stops, on delayed timeline
  560. optional int32 replay_start_at = 4; // the tick when replay starts, on real timeline
  561. optional int32 replay_slowdown_begin = 5;
  562. optional int32 replay_slowdown_end = 6;
  563. optional float replay_slowdown_rate = 7;
  564. }
  565. enum ReplayEventType_t
  566. {
  567. REPLAY_EVENT_CANCEL = 0; // Cancel any replays in progress
  568. REPLAY_EVENT_DEATH = 1; // replay the last player death
  569. REPLAY_EVENT_GENERIC = 2; // replay the event specified in the message
  570. REPLAY_EVENT_STUCK_NEED_FULL_UPDATE = 3; // the client is stuck , the full frame update was somehow discarded at netchan level (reason unknown as of end of 2015), and a new full update is requested
  571. }
  572. message CCLCMsg_HltvReplay
  573. {
  574. optional int32 request = 1; // 0 = cancel, 1 = request death replay, 2 = request arbitrary replay, 3 = request full frame update because client didn't receive it when expected
  575. optional float slowdown_length = 2;
  576. optional float slowdown_rate = 3;
  577. optional int32 primary_target_ent_index = 4;
  578. optional float event_time = 5;
  579. }
  580. message CSVCMsg_Broadcast_Command
  581. {
  582. optional string cmd = 1;
  583. }
  584. // Do not remove this comment due to a bug on the Mac OS X protobuf compiler - <sergiy> integrated from Dota