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.

88 lines
4.4 KiB

  1. //====== Copyright (c) 2016, 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. message CEngineGotvSyncPacket
  67. {
  68. optional uint64 match_id = 1; // Unique Match ID
  69. optional uint32 instance_id = 2; // GoTV instance ID
  70. optional uint32 signupfragment = 3; // Numeric value index of signup fragment
  71. optional uint32 currentfragment = 4; // Numeric value index of current fragment
  72. optional float tickrate = 5; // number of ticks per second on server
  73. optional uint32 tick = 6; // Start Tick of the current fragment
  74. optional float rtdelay = 8; // delay of this fragment from real-time, seconds
  75. optional float rcvage = 9; // Receive age: how many seconds since relay last received data from game server
  76. optional float keyframe_interval = 10; // the interval between full keyframes, in seconds
  77. };
  78. // Do not remove this comment due to a bug on the Mac OS X protobuf compiler - <sergiy> integrated from Dota