Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to CS2 schema v14065 #126

Merged
merged 3 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 0.28.1 (2025-01-30)

- Update to latest CS2 schema (v14065)
- Add support for new `DemRecovery` message

### 0.27.1 (2024-11-02)

- BREAKING CHANGE: Exceptions when fetching data from the broadcast server are now immediately propagated to `MoveNextAsync`. You must handle retries and rate limiting in your `HttpClient`, e.g. by using `RetryingBroadcastHttpHandler`
Expand Down
Binary file added demos/14065.dem
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion src/DemoFile.Benchmark/DemoFile.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DefineConstants Condition=" '$(Configuration)' == 'Baseline' ">$(DefineConstants);BASELINE</DefineConstants>
Expand Down
2 changes: 1 addition & 1 deletion src/DemoFile.Game.Cs/Protobufs/base_gcmessages_csgo.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "steammessages.proto";
import "steammessages.proto";

enum EGCBaseMsg {
k_EMsgGCSystemMessage = 4001;
Expand Down
4 changes: 3 additions & 1 deletion src/DemoFile.Game.Cs/Protobufs/c_peer2peer_netmessages.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "netmessages.proto";
import "netmessages.proto";
import "networkbasetypes.proto";

enum P2P_Messages {
Expand All @@ -7,6 +7,8 @@ enum P2P_Messages {
p2p_Ping = 258;
p2p_VRAvatarPosition = 259;
p2p_WatchSynchronization = 260;
p2p_FightingGame_GameData = 261;
p2p_FightingGame_Connection = 262;
}

message CP2P_TextMessage {
Expand Down
2 changes: 1 addition & 1 deletion src/DemoFile.Game.Cs/Protobufs/clientmessages.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum EBaseClientMessages {
enum EBaseClientMessages {
CM_CustomGameEvent = 280;
CM_CustomGameEventBounce = 281;
CM_ClientUIEvent = 282;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "netmessages.proto";
import "netmessages.proto";

message C2S_CONNECT_Message {
optional uint32 host_version = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/DemoFile.Game.Cs/Protobufs/cs_gameevents.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
syntax = "proto2";
syntax = "proto2";

import "networkbasetypes.proto";

Expand Down
23 changes: 15 additions & 8 deletions src/DemoFile.Game.Cs/Protobufs/cs_usercmd.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "networkbasetypes.proto";
import "networkbasetypes.proto";
import "usercmd.proto";

message CSGOInterpolationInfoPB {
Expand All @@ -7,22 +7,26 @@ message CSGOInterpolationInfoPB {
optional float frac = 3 [default = 0];
}

message CSGOInterpolationInfoPB_CL {
optional float frac = 3 [default = 0];
}

message CSGOInputHistoryEntryPB {
optional .CMsgQAngle view_angles = 2;
optional int32 render_tick_count = 4;
optional float render_tick_fraction = 5;
optional int32 player_tick_count = 6;
optional float player_tick_fraction = 7;
optional .CSGOInterpolationInfoPB cl_interp = 12;
optional .CSGOInterpolationInfoPB_CL cl_interp = 12;
optional .CSGOInterpolationInfoPB sv_interp0 = 13;
optional .CSGOInterpolationInfoPB sv_interp1 = 14;
optional .CSGOInterpolationInfoPB player_interp = 15;
optional int32 frame_number = 20;
optional int32 target_ent_index = 8 [default = -1];
optional .CMsgVector shoot_position = 3;
optional .CMsgVector target_head_pos_check = 9;
optional .CMsgVector target_abs_pos_check = 10;
optional .CMsgQAngle target_abs_ang_check = 11;
optional int32 frame_number = 64;
optional int32 target_ent_index = 65 [default = -1];
optional .CMsgVector shoot_position = 66;
optional .CMsgVector target_head_pos_check = 67;
optional .CMsgVector target_abs_pos_check = 68;
optional .CMsgQAngle target_abs_ang_check = 69;
}

message CSGOUserCmdPB {
Expand All @@ -32,4 +36,7 @@ message CSGOUserCmdPB {
optional int32 attack2_start_history_index = 7 [default = -1];
optional int32 attack3_start_history_index = 8 [default = -1];
optional bool left_hand_desired = 9 [default = false];
optional bool is_predicting_body_shot_fx = 11 [default = false];
optional bool is_predicting_head_shot_fx = 12 [default = false];
optional bool is_predicting_kill_ragdolls = 13 [default = false];
}
71 changes: 69 additions & 2 deletions src/DemoFile.Game.Cs/Protobufs/cstrike15_gcmessages.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
syntax = "proto2";
syntax = "proto2";

import "steammessages.proto";
import "engine_gcmessages.proto";
Expand Down Expand Up @@ -107,6 +107,10 @@ enum ECsgoGCMsg {
k_EMsgGCCStrike15_v2_SetPlayerLeaderboardSafeName = 9218;
k_EMsgGCCStrike15_v2_ClientRedeemFreeReward = 9219;
k_EMsgGCCStrike15_v2_ClientNetworkConfig = 9220;
k_EMsgGCCStrike15_v2_GC2ClientNotifyXPShop = 9221;
k_EMsgGCCStrike15_v2_Client2GcAckXPShopTracks = 9222;
k_EMsgGCCStrike15_v2_MatchmakingGC2ClientSearchStats = 9223;
k_EMsgGCCStrike15_v2_PremierSeasonSummary = 9224;
}

enum ECsgoSteamUserStat {
Expand Down Expand Up @@ -242,6 +246,7 @@ message PlayerRankingInfo {
optional uint32 rank_if_tie = 12;
repeated .PlayerRankingInfo.PerMapRank per_map_rank = 13;
optional uint32 leaderboard_name_status = 14;
optional uint32 highest_rank = 15;
}

message PlayerCommendationInfo {
Expand Down Expand Up @@ -406,6 +411,7 @@ message CMsgGC_ServerQuestUpdateData {
optional bytes binary_data = 2;
optional uint32 mm_game_mode = 3;
optional .ScoreLeaderboardData missionlbsdata = 4;
optional uint32 flags = 5;
}

message CMsgGCCStrike15_v2_MatchmakingGC2ServerConfirm {
Expand Down Expand Up @@ -535,6 +541,7 @@ message CMsgGCCStrike15_v2_MatchmakingGC2ServerReserve {
optional uint32 tv_control = 17;
repeated .OperationalVarValue op_var_values = 19;
optional uint32 socache_control = 20;
repeated int32 teammate_colors = 21;
}

message CMsgGCCStrike15_v2_MatchmakingServerReservationResponse {
Expand Down Expand Up @@ -819,6 +826,35 @@ message CMsgGCCStrike15_v2_PlayersProfile {
repeated .CMsgGCCStrike15_v2_MatchmakingGC2ClientHello account_profiles = 2;
}

message CMsgGCCStrike15_v2_PremierSeasonSummary {
message DataPerWeek {
optional uint64 week_id = 1;
optional uint32 rank_id = 2;
optional uint32 matches_played = 3;
}

message DataPerMap {
optional uint32 map_id = 1;
optional uint32 wins = 2;
optional uint32 ties = 3;
optional uint32 losses = 4;
optional uint32 rounds = 5;
optional uint32 kills = 6;
optional uint32 headshots = 7;
optional uint32 assists = 8;
optional uint32 deaths = 9;
optional uint32 mvps = 10;
optional uint32 rounds_3k = 11;
optional uint32 rounds_4k = 12;
optional uint32 rounds_5k = 13;
}

optional uint32 account_id = 1;
optional uint32 season_id = 2;
repeated .CMsgGCCStrike15_v2_PremierSeasonSummary.DataPerWeek data_per_week = 3;
repeated .CMsgGCCStrike15_v2_PremierSeasonSummary.DataPerMap data_per_map = 4;
}

message CMsgGCCStrike15_v2_PlayerOverwatchCaseUpdate {
optional uint64 caseid = 1;
optional uint32 suspectid = 3;
Expand Down Expand Up @@ -880,6 +916,8 @@ message CEconItemPreviewDataBlock {
optional uint32 tint_id = 6;
optional float offset_x = 7;
optional float offset_y = 8;
optional float offset_z = 9;
optional uint32 pattern = 10;
}

optional uint32 accountid = 1;
Expand All @@ -901,6 +939,7 @@ message CEconItemPreviewDataBlock {
optional uint32 musicindex = 17;
optional int32 entindex = 18;
optional uint32 petindex = 19;
repeated .CEconItemPreviewDataBlock.Sticker keychains = 20;
}

message CMsgGCCStrike15_v2_MatchEndRewardDropsNotification {
Expand Down Expand Up @@ -1119,11 +1158,21 @@ message CSOEconCoupon {
}

message CSOAccountItemPersonalStore {
optional uint32 generation_time = 1 [(key_field) = true];
optional uint32 generation_time = 1;
optional uint32 redeemable_balance = 2;
repeated uint64 items = 3;
}

message CSOAccountXpShop {
optional uint32 generation_time = 1;
optional uint32 redeemable_balance = 2;
repeated uint32 xp_tracks = 3;
}

message CSOAccountKeychainRemoveToolCharges {
optional uint32 charges = 1;
}

message CSOQuestProgress {
optional uint32 questid = 1 [(key_field) = true];
optional uint32 points_remaining = 2;
Expand Down Expand Up @@ -1153,6 +1202,24 @@ message CSOPersonaDataPublic {
optional uint32 xp_trail_level = 5;
}

message CMsgGCCStrike15_v2_GC2ClientNotifyXPShop {
optional .CSOAccountXpShop prematch = 1;
optional .CSOAccountXpShop postmatch = 2;
optional uint32 current_xp = 3;
optional uint32 current_level = 4;
}

message CMsgGCCStrike15_v2_Client2GcAckXPShopTracks {
}

message CMsgGCCStrike15_v2_MatchmakingGC2ClientSearchStats {
optional uint32 gs_location_id = 1;
optional uint32 data_center_id = 2;
optional uint32 num_locked_in = 3;
optional uint32 num_found_nearby = 4;
optional uint32 note_level = 5;
}

message CMsgGC_GlobalGame_Subscribe {
optional uint64 ticket = 1;
}
Expand Down
20 changes: 19 additions & 1 deletion src/DemoFile.Game.Cs/Protobufs/cstrike15_usermessages.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
syntax = "proto2";
syntax = "proto2";

import "networkbasetypes.proto";
import "cstrike15_gcmessages.proto";
Expand Down Expand Up @@ -79,6 +79,8 @@ enum ECstrike15UserMessages {
CS_UM_CurrentRoundOdds = 380;
CS_UM_DeepStats = 381;
CS_UM_ShootInfo = 383;
CS_UM_CounterStrafe = 385;
CS_UM_DamagePrediction = 386;
}

enum ECSUsrMsg_DisconnectToLobby_Action {
Expand Down Expand Up @@ -595,3 +597,19 @@ message CCSUsrMsgPreMatchSayText {
optional string text = 2;
optional bool all_chat = 3;
}

message CCSUsrMsg_CounterStrafe {
optional int32 press_to_release_ns = 1;
optional int32 total_keys_down = 2;
}

message CCSUsrMsg_DamagePrediction {
optional int32 command_num = 1;
optional int32 pellet_idx = 2;
optional int32 victim_slot = 3;
optional int32 victim_starting_health = 4;
optional int32 victim_damage = 5;
optional .CMsgVector shoot_pos = 6;
optional .CMsgQAngle shoot_dir = 7;
optional .CMsgQAngle aim_punch = 8;
}
17 changes: 14 additions & 3 deletions src/DemoFile.Game.Cs/Protobufs/demo.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
syntax = "proto2";
syntax = "proto2";

enum EDemoCommands {
DEM_Error = -1;
Expand All @@ -20,7 +20,8 @@ enum EDemoCommands {
DEM_SpawnGroups = 15;
DEM_AnimationData = 16;
DEM_AnimationHeader = 17;
DEM_Max = 18;
DEM_Recovery = 18;
DEM_Max = 19;
DEM_IsCompressed = 64;
}

Expand Down Expand Up @@ -55,7 +56,7 @@ message CGameInfo {
message CHeroSelectEvent {
optional bool is_pick = 1;
optional uint32 team = 2;
optional uint32 hero_id = 3;
optional int32 hero_id = 3;
}

optional uint64 match_id = 1;
Expand Down Expand Up @@ -173,3 +174,13 @@ message CDemoUserCmd {
message CDemoSpawnGroups {
repeated bytes msgs = 3;
}

message CDemoRecovery {
message DemoInitialSpawnGroupEntry {
optional uint32 spawngrouphandle = 1;
optional bool was_created = 2;
}

optional .CDemoRecovery.DemoInitialSpawnGroupEntry initial_spawn_group = 1;
optional bytes spawn_group_message = 2;
}
15 changes: 14 additions & 1 deletion src/DemoFile.Game.Cs/Protobufs/econ_gcmessages.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "steammessages.proto";
import "steammessages.proto";

enum EGCItemMsg {
k_EMsgGCBase = 1000;
Expand Down Expand Up @@ -114,6 +114,7 @@ enum EGCItemMsg {
k_EMsgGCDev_NewItemRequest = 2001;
k_EMsgGCDev_NewItemRequestResponse = 2002;
k_EMsgGCDev_PaintKitDropItem = 2003;
k_EMsgGCDev_SchemaReservationRequest = 2004;
k_EMsgGCStoreGetUserData = 2500;
k_EMsgGCStoreGetUserDataResponse = 2501;
k_EMsgGCStorePurchaseInit_DEPRECATED = 2502;
Expand Down Expand Up @@ -191,12 +192,16 @@ enum EGCItemCustomizationNotification {
k_EGCItemCustomizationNotification_StatTrakSwap = 1088;
k_EGCItemCustomizationNotification_RemovePatch = 1089;
k_EGCItemCustomizationNotification_ApplyPatch = 1090;
k_EGCItemCustomizationNotification_ApplyKeychain = 1091;
k_EGCItemCustomizationNotification_RemoveKeychain = 1092;
k_EGCItemCustomizationNotification_ActivateFanToken = 9178;
k_EGCItemCustomizationNotification_ActivateOperationCoin = 9179;
k_EGCItemCustomizationNotification_GraffitiUnseal = 9185;
k_EGCItemCustomizationNotification_GenerateSouvenir = 9204;
k_EGCItemCustomizationNotification_ClientRedeemMissionReward = 9209;
k_EGCItemCustomizationNotification_ClientRedeemFreeReward = 9219;
k_EGCItemCustomizationNotification_XpShopUseTicket = 9221;
k_EGCItemCustomizationNotification_XpShopAckTracks = 9222;
}

message CMsgGCGiftedItems {
Expand All @@ -207,6 +212,13 @@ message CMsgGCGiftedItems {
repeated uint32 recipients_accountids = 5;
}

message CMsgGCDev_SchemaReservationRequest {
optional string schema_typename = 1;
optional string instance_name = 2;
optional uint64 context = 3;
optional uint64 id = 4;
}

message CMsgCasketItem {
optional uint64 casket_item_id = 1;
optional uint64 item_item_id = 2;
Expand All @@ -219,4 +231,5 @@ message CMsgGCUserTrackTimePlayedConsecutively {
message CMsgGCItemCustomizationNotification {
repeated uint64 item_id = 1;
optional uint32 request = 2;
repeated uint64 extra_data = 3;
}
2 changes: 1 addition & 1 deletion src/DemoFile.Game.Cs/Protobufs/engine_gcmessages.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
syntax = "proto2";
syntax = "proto2";

import "google/protobuf/descriptor.proto";

Expand Down
Loading
Loading