csgo-2018-source/common/engine_gcmessages.proto
2021-07-24 21:11:47 -07:00

89 lines
4.4 KiB
Protocol Buffer
Raw Permalink Blame History

//====== Copyright (c) 2016, Valve Corporation, All rights reserved. ========//
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//===========================================================================//
//
// Purpose: The file defines our Google Protocol Buffers which are used in over
// the wire messages for the Source engine.
//
//=============================================================================
// Note about encoding:
// http://code.google.com/apis/protocolbuffers/docs/encoding.html
//
// TL;DR: Use sint32/sint64 for values that may be negative.
//
// There is an important difference between the signed int types (sint32 and sint64)
// and the "standard" int types (int32 and int64) when it comes to encoding negative
// numbers. If you use int32 or int64 as the type for a negative number, the
// resulting varint is always ten bytes long <20> it is, effectively, treated like a
// very large unsigned integer. If you use one of the signed types, the resulting
// varint uses ZigZag encoding, which is much more efficient.
// Commenting this out allows it to be compiled for SPEED or LITE_RUNTIME.
// option optimize_for = SPEED;
// We don't use the service generation functionality
option cc_generic_services = false;
//
// STYLE NOTES:
//
// Use CamelCase CMsgMyMessageName style names for messages.
//
// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
// but plays nice with the Google formatted code generation.
//
// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
// your message and wants to remove or rename fields.
//
// Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
// than 2^56 as it will safe space on the wire in those cases.
//
// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
// 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
// time.
//
import "google/protobuf/descriptor.proto";
message CEngineGotvSyncPacket
{
optional uint64 match_id = 1; // Unique Match ID
optional uint32 instance_id = 2; // GoTV instance ID
optional uint32 signupfragment = 3; // Numeric value index of signup fragment
optional uint32 currentfragment = 4; // Numeric value index of current fragment
optional float tickrate = 5; // number of ticks per second on server
optional uint32 tick = 6; // Start Tick of the current fragment
optional float rtdelay = 8; // delay of this fragment from real-time, seconds
optional float rcvage = 9; // Receive age: how many seconds since relay last received data from game server
optional float keyframe_interval = 10; // the interval between full keyframes, in seconds
};
// Do not remove this comment due to a bug on the Mac OS X protobuf compiler - <sergiy> integrated from Dota