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.
601 lines
14 KiB
601 lines
14 KiB
//====== Copyright (c) 2013, 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.
|
|
//
|
|
//=============================================================================
|
|
|
|
// We care more about speed than code size
|
|
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";
|
|
|
|
// for CMsgVector, etc.
|
|
import "netmessages.proto";
|
|
import "cstrike15_gcmessages.proto";
|
|
|
|
//=============================================================================
|
|
// CStrike15 User Messages
|
|
//=============================================================================
|
|
|
|
enum ECstrike15UserMessages
|
|
{
|
|
CS_UM_VGUIMenu = 1;
|
|
CS_UM_Geiger = 2;
|
|
CS_UM_Train = 3;
|
|
CS_UM_HudText = 4;
|
|
CS_UM_SayText = 5;
|
|
CS_UM_SayText2 = 6;
|
|
CS_UM_TextMsg = 7;
|
|
CS_UM_HudMsg = 8;
|
|
CS_UM_ResetHud = 9;
|
|
CS_UM_GameTitle = 10;
|
|
CS_UM_Shake = 12;
|
|
CS_UM_Fade = 13; // fade HUD in/out
|
|
CS_UM_Rumble = 14;
|
|
CS_UM_CloseCaption = 15;
|
|
CS_UM_CloseCaptionDirect = 16;
|
|
CS_UM_SendAudio = 17;
|
|
CS_UM_RawAudio = 18;
|
|
CS_UM_VoiceMask = 19;
|
|
CS_UM_RequestState = 20;
|
|
CS_UM_Damage = 21;
|
|
CS_UM_RadioText = 22;
|
|
CS_UM_HintText = 23;
|
|
CS_UM_KeyHintText = 24;
|
|
CS_UM_ProcessSpottedEntityUpdate = 25;
|
|
CS_UM_ReloadEffect = 26;
|
|
CS_UM_AdjustMoney = 27;
|
|
CS_UM_UpdateTeamMoney = 28;
|
|
CS_UM_StopSpectatorMode = 29;
|
|
CS_UM_KillCam = 30;
|
|
CS_UM_DesiredTimescale = 31;
|
|
CS_UM_CurrentTimescale = 32;
|
|
CS_UM_AchievementEvent = 33;
|
|
CS_UM_MatchEndConditions = 34;
|
|
CS_UM_DisconnectToLobby = 35;
|
|
CS_UM_PlayerStatsUpdate = 36;
|
|
CS_UM_DisplayInventory = 37;
|
|
CS_UM_WarmupHasEnded = 38;
|
|
CS_UM_ClientInfo = 39;
|
|
CS_UM_XRankGet = 40; // Get ELO Rank Value from Client
|
|
CS_UM_XRankUpd = 41; // Update ELO Rank Value on Client
|
|
CS_UM_CallVoteFailed = 45;
|
|
CS_UM_VoteStart = 46;
|
|
CS_UM_VotePass = 47;
|
|
CS_UM_VoteFailed = 48;
|
|
CS_UM_VoteSetup = 49;
|
|
CS_UM_ServerRankRevealAll = 50;
|
|
CS_UM_SendLastKillerDamageToClient = 51;
|
|
CS_UM_ServerRankUpdate = 52;
|
|
CS_UM_ItemPickup = 53;
|
|
CS_UM_ShowMenu = 54; // show hud menu
|
|
CS_UM_BarTime = 55; // For the C4 progress bar.
|
|
CS_UM_AmmoDenied = 56;
|
|
CS_UM_MarkAchievement = 57;
|
|
CS_UM_MatchStatsUpdate = 58;
|
|
CS_UM_ItemDrop = 59;
|
|
CS_UM_GlowPropTurnOff = 60;
|
|
CS_UM_SendPlayerItemDrops = 61;
|
|
CS_UM_RoundBackupFilenames = 62;
|
|
CS_UM_SendPlayerItemFound = 63;
|
|
CS_UM_ReportHit = 64;
|
|
CS_UM_XpUpdate = 65;
|
|
CS_UM_QuestProgress = 66; // Send notification to user when quest progress was made.
|
|
CS_UM_ScoreLeaderboardData = 67; // Game server broadcasting match end scoreboard and leaderboard data
|
|
CS_UM_PlayerDecalDigitalSignature = 68; // Game server can ask client to provide a digital signature for decal data
|
|
}
|
|
|
|
//=============================================================================
|
|
|
|
|
|
message CCSUsrMsg_VGUIMenu
|
|
{
|
|
optional string name = 1;
|
|
optional bool show = 2;
|
|
|
|
message Subkey
|
|
{
|
|
optional string name = 1;
|
|
optional string str = 2;
|
|
}
|
|
|
|
repeated Subkey subkeys = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_Geiger
|
|
{
|
|
optional int32 range = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_Train
|
|
{
|
|
optional int32 train = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_HudText
|
|
{
|
|
optional string text = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_SayText
|
|
{
|
|
optional int32 ent_idx = 1;
|
|
optional string text = 2;
|
|
optional bool chat = 3;
|
|
optional bool textallchat = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_SayText2
|
|
{
|
|
optional int32 ent_idx = 1;
|
|
optional bool chat = 2;
|
|
optional string msg_name = 3;
|
|
repeated string params = 4;
|
|
optional bool textallchat = 5;
|
|
}
|
|
|
|
message CCSUsrMsg_TextMsg
|
|
{
|
|
optional int32 msg_dst = 1;
|
|
repeated string params = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_HudMsg
|
|
{
|
|
optional int32 channel = 1;
|
|
optional CMsgVector2D pos = 2;
|
|
optional CMsgRGBA clr1 = 3;
|
|
optional CMsgRGBA clr2 = 4;
|
|
optional int32 effect = 5;
|
|
optional float fade_in_time = 6;
|
|
optional float fade_out_time = 7;
|
|
optional float hold_time = 9;
|
|
optional float fx_time = 10;
|
|
optional string text = 11;
|
|
}
|
|
|
|
message CCSUsrMsg_Shake
|
|
{
|
|
optional int32 command = 1;
|
|
optional float local_amplitude = 2;
|
|
optional float frequency = 3;
|
|
optional float duration = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_Fade
|
|
{
|
|
optional int32 duration = 1;
|
|
optional int32 hold_time = 2;
|
|
optional int32 flags = 3; // fade type (in / out)
|
|
optional CMsgRGBA clr = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_Rumble
|
|
{
|
|
optional int32 index = 1;
|
|
optional int32 data = 2;
|
|
optional int32 flags = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_CloseCaption
|
|
{
|
|
optional uint32 hash = 1;
|
|
optional int32 duration = 2;
|
|
optional bool from_player = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_CloseCaptionDirect
|
|
{
|
|
optional uint32 hash = 1;
|
|
optional int32 duration = 2;
|
|
optional bool from_player = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_SendAudio
|
|
{
|
|
optional string radio_sound = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_RawAudio
|
|
{
|
|
optional int32 pitch = 1;
|
|
optional int32 entidx = 2;
|
|
optional float duration = 3;
|
|
optional string voice_filename = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_VoiceMask
|
|
{
|
|
message PlayerMask
|
|
{
|
|
optional int32 game_rules_mask = 1;
|
|
optional int32 ban_masks = 2;
|
|
}
|
|
|
|
repeated PlayerMask player_masks = 1;
|
|
optional bool player_mod_enable = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_Damage
|
|
{
|
|
optional int32 amount = 1;
|
|
optional CMsgVector inflictor_world_pos = 2;
|
|
optional int32 victim_entindex = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_RadioText
|
|
{
|
|
optional int32 msg_dst = 1;
|
|
optional int32 client = 2;
|
|
optional string msg_name = 3;
|
|
repeated string params = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_HintText
|
|
{
|
|
optional string text = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_KeyHintText
|
|
{
|
|
repeated string hints = 1;
|
|
}
|
|
|
|
// gurjeets - Message below is slightly bigger in size than the non-protobuf version,
|
|
// by around 8 bits.
|
|
message CCSUsrMsg_ProcessSpottedEntityUpdate
|
|
{
|
|
optional bool new_update = 1;
|
|
|
|
message SpottedEntityUpdate
|
|
{
|
|
optional int32 entity_idx = 1;
|
|
optional int32 class_id = 2;
|
|
optional int32 origin_x = 3;
|
|
optional int32 origin_y = 4;
|
|
optional int32 origin_z = 5;
|
|
optional int32 angle_y = 6;
|
|
optional bool defuser = 7;
|
|
optional bool player_has_defuser = 8;
|
|
optional bool player_has_c4 = 9;
|
|
}
|
|
|
|
repeated SpottedEntityUpdate entity_updates = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_SendPlayerItemDrops
|
|
{
|
|
repeated CEconItemPreviewDataBlock entity_updates = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_SendPlayerItemFound
|
|
{
|
|
optional CEconItemPreviewDataBlock iteminfo = 1;
|
|
optional int32 entindex = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_ReloadEffect
|
|
{
|
|
optional int32 entidx = 1;
|
|
optional int32 actanim = 2;
|
|
optional float origin_x = 3;
|
|
optional float origin_y = 4;
|
|
optional float origin_z = 5;
|
|
}
|
|
|
|
message CCSUsrMsg_AdjustMoney
|
|
{
|
|
optional int32 amount = 1;
|
|
}
|
|
|
|
// This code allowed us to measure discrepency between client and server bullet hits.
|
|
// It became obsolete when we started using a separate seed for client and server
|
|
// to eliminate 'rage' hacks.
|
|
//
|
|
message CCSUsrMsg_ReportHit
|
|
{
|
|
optional float pos_x = 1;
|
|
optional float pos_y = 2;
|
|
optional float timestamp = 4;
|
|
optional float pos_z = 3;
|
|
}
|
|
|
|
|
|
message CCSUsrMsg_KillCam
|
|
{
|
|
optional int32 obs_mode = 1;
|
|
optional int32 first_target = 2;
|
|
optional int32 second_target = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_DesiredTimescale
|
|
{
|
|
optional float desired_timescale = 1;
|
|
optional float duration_realtime_sec = 2;
|
|
optional int32 interpolator_type = 3;
|
|
optional float start_blend_time = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_CurrentTimescale
|
|
{
|
|
optional float cur_timescale = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_AchievementEvent
|
|
{
|
|
optional int32 achievement = 1;
|
|
optional int32 count = 2;
|
|
optional int32 user_id = 3;
|
|
}
|
|
|
|
|
|
message CCSUsrMsg_MatchEndConditions
|
|
{
|
|
optional int32 fraglimit = 1;
|
|
optional int32 mp_maxrounds = 2;
|
|
optional int32 mp_winlimit = 3;
|
|
optional int32 mp_timelimit = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_PlayerStatsUpdate
|
|
{
|
|
optional int32 version = 1;
|
|
|
|
message Stat
|
|
{
|
|
optional int32 idx = 1;
|
|
optional int32 delta = 2;
|
|
}
|
|
|
|
repeated Stat stats = 4;
|
|
optional int32 user_id = 5;
|
|
optional int32 crc = 6;
|
|
}
|
|
|
|
message CCSUsrMsg_DisplayInventory
|
|
{
|
|
optional bool display = 1;
|
|
optional int32 user_id = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_QuestProgress
|
|
{
|
|
optional uint32 quest_id = 1;
|
|
optional uint32 normal_points = 2;
|
|
optional uint32 bonus_points = 3;
|
|
optional bool is_event_quest = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_ScoreLeaderboardData
|
|
{
|
|
optional ScoreLeaderboardData data = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_PlayerDecalDigitalSignature
|
|
{
|
|
optional PlayerDecalDigitalSignature data = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_XRankGet
|
|
{
|
|
optional int32 mode_idx = 1;
|
|
optional int32 controller = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_XRankUpd
|
|
{
|
|
optional int32 mode_idx = 1;
|
|
optional int32 controller = 2;
|
|
optional int32 ranking = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_CallVoteFailed
|
|
{
|
|
optional int32 reason = 1;
|
|
optional int32 time = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_VoteStart
|
|
{
|
|
optional int32 team = 1;
|
|
optional int32 ent_idx = 2;
|
|
optional int32 vote_type = 3;
|
|
optional string disp_str = 4;
|
|
optional string details_str = 5;
|
|
optional string other_team_str = 6;
|
|
optional bool is_yes_no_vote = 7;
|
|
|
|
}
|
|
|
|
message CCSUsrMsg_VotePass
|
|
{
|
|
optional int32 team = 1;
|
|
optional int32 vote_type = 2;
|
|
optional string disp_str= 3;
|
|
optional string details_str = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_VoteFailed
|
|
{
|
|
optional int32 team = 1;
|
|
optional int32 reason = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_VoteSetup
|
|
{
|
|
repeated string potential_issues = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_SendLastKillerDamageToClient
|
|
{
|
|
optional int32 num_hits_given = 1;
|
|
optional int32 damage_given = 2;
|
|
optional int32 num_hits_taken = 3;
|
|
optional int32 damage_taken = 4;
|
|
}
|
|
|
|
message CCSUsrMsg_ServerRankUpdate
|
|
{
|
|
message RankUpdate
|
|
{
|
|
optional int32 account_id = 1;
|
|
optional int32 rank_old = 2;
|
|
optional int32 rank_new = 3;
|
|
optional int32 num_wins = 4;
|
|
optional float rank_change = 5;
|
|
}
|
|
|
|
repeated RankUpdate rank_update = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_XpUpdate
|
|
{
|
|
optional CMsgGCCstrike15_v2_GC2ServerNotifyXPRewarded data = 1;
|
|
}
|
|
|
|
|
|
message CCSUsrMsg_ItemPickup
|
|
{
|
|
optional string item = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_ShowMenu
|
|
{
|
|
optional int32 bits_valid_slots = 1;
|
|
optional int32 display_time = 2;
|
|
optional string menu_string = 3;
|
|
}
|
|
|
|
message CCSUsrMsg_BarTime
|
|
{
|
|
optional string time = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_AmmoDenied
|
|
{
|
|
optional int32 ammoIdx = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_MarkAchievement
|
|
{
|
|
optional string achievement = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_MatchStatsUpdate
|
|
{
|
|
optional string update = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_ItemDrop
|
|
{
|
|
optional int64 itemid = 1;
|
|
optional bool death = 2;
|
|
}
|
|
|
|
message CCSUsrMsg_GlowPropTurnOff
|
|
{
|
|
optional int32 entidx = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_RoundBackupFilenames
|
|
{
|
|
optional int32 count = 1;
|
|
optional int32 index = 2;
|
|
optional string filename = 3;
|
|
optional string nicename = 4;
|
|
}
|
|
|
|
|
|
|
|
//=============================================================================
|
|
// Messages where the data seems to be irrelevant
|
|
//=============================================================================
|
|
|
|
message CCSUsrMsg_ResetHud
|
|
{
|
|
optional bool reset = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_GameTitle
|
|
{
|
|
optional int32 dummy = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_RequestState
|
|
{
|
|
optional int32 dummy = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_StopSpectatorMode
|
|
{
|
|
optional int32 dummy = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_DisconnectToLobby
|
|
{
|
|
optional int32 dummy = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_WarmupHasEnded
|
|
{
|
|
optional int32 dummy = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_ClientInfo
|
|
{
|
|
optional int32 dummy = 1;
|
|
}
|
|
|
|
message CCSUsrMsg_ServerRankRevealAll
|
|
{
|
|
optional int32 seconds_till_shutdown = 1;
|
|
}
|