Skip to content

Commit

Permalink
Update schema and demo format for v14011
Browse files Browse the repository at this point in the history
  • Loading branch information
saul committed Jun 1, 2024
1 parent 0974891 commit f2955d9
Show file tree
Hide file tree
Showing 37 changed files with 13,146 additions and 24,935 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 0.15.1 (2024-06-01)

- Update schema and demo format for v14011

### 0.14.1 (2024-05-26)

- Fix parsing error since 2024-05-23 update (full schema update to follow)
Expand Down
Binary file added demos/14011.dem
Binary file not shown.
5 changes: 5 additions & 0 deletions protos/clientmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ enum EBaseClientMessages {
CM_DevPaletteVisibilityChanged = 283;
CM_WorldUIControllerHasPanelChanged = 284;
CM_RotateAnchor = 285;
CM_ListenForResponseFound = 286;
CM_MAX_BASE = 300;
}

Expand Down Expand Up @@ -46,3 +47,7 @@ message CClientMsg_WorldUIControllerHasPanelChangedEvent {
message CClientMsg_RotateAnchor {
optional float angle = 1;
}

message CClientMsg_ListenForResponseFound {
optional int32 player_slot = 1 [default = -1];
}
1 change: 1 addition & 0 deletions protos/cstrike15_gcmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ message CEconItemPreviewDataBlock {
optional uint32 dropreason = 16;
optional uint32 musicindex = 17;
optional int32 entindex = 18;
optional uint32 petindex = 19;
}

message CMsgGCCStrike15_v2_MatchEndRewardDropsNotification {
Expand Down
3 changes: 3 additions & 0 deletions protos/econ_gcmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ enum EGCItemMsg {
k_EMsgGCRecurringSubscriptionStatus = 2530;
k_EMsgGCAdjustEquipSlotsManual = 2531;
k_EMsgGCAdjustEquipSlotsShuffle = 2532;
k_EMsgGCNameItemAndEquip = 2533;
k_EMsgGCOpenCrate = 2534;
k_EMsgGCAcknowledgeRentalExpiration = 2535;
}

enum EGCMsgResponse {
Expand Down
23 changes: 14 additions & 9 deletions protos/netmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ enum SVC_Messages {
svc_HltvReplay = 73;
svc_Broadcast_Command = 74;
svc_HltvFixupOperatorStatus = 75;
svc_UserCmds = 76;
}

enum VoiceDataFormat_t {
Expand Down Expand Up @@ -358,14 +359,6 @@ message CSVCMsg_GameEventList {
}

message CSVCMsg_PacketEntities {
message command_queue_info_t {
optional uint32 commands_queued = 1;
optional uint32 command_queue_desired_size = 2;
optional uint32 starved_command_ticks = 3;
optional float time_dilation_percent = 4;
optional uint32 discarded_command_ticks = 5;
}

message alternate_baseline_t {
optional int32 entity_index = 1;
optional int32 baseline_index = 2;
Expand All @@ -390,11 +383,12 @@ message CSVCMsg_PacketEntities {
optional sint32 last_cmd_number_recv_delta = 17;
optional uint32 server_tick = 12;
optional bytes serialized_entities = 13;
optional .CSVCMsg_PacketEntities.command_queue_info_t command_queue_info = 14;
repeated .CSVCMsg_PacketEntities.alternate_baseline_t alternate_baselines = 15;
optional uint32 has_pvs_vis_bits = 16;
optional uint32 last_cmd_recv_margin = 18;
optional .CSVCMsg_PacketEntities.non_transmitted_entities_t non_transmitted_entities = 19;
optional uint32 cq_starved_command_ticks = 20;
optional uint32 cq_discarded_command_ticks = 21;
optional bytes dev_padding = 999;
}

Expand Down Expand Up @@ -618,3 +612,14 @@ message CSVCMsg_HltvFixupOperatorStatus {
optional uint32 mode = 1;
optional string override_operator_name = 2;
}

message CMsgServerUserCmd {
optional bytes data = 1;
optional int32 cmd_number = 2;
optional int32 player_slot = 3 [default = -1];
optional int32 server_tick_executed = 4;
}

message CSVCMsg_UserCommands {
repeated .CMsgServerUserCmd commands = 1;
}
4 changes: 2 additions & 2 deletions protos/networkbasetypes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum SignonState_t {

enum NET_Messages {
net_NOP = 0;
net_Disconnect = 1;
net_Disconnect_Legacy = 1;
net_SplitScreenUser = 3;
net_Tick = 4;
net_StringCmd = 5;
Expand Down Expand Up @@ -107,7 +107,7 @@ message CNETMsg_SplitScreenUser {
optional int32 slot = 1;
}

message CNETMsg_Disconnect {
message CNETMsg_Disconnect_Legacy {
optional .ENetworkDisconnectionReason reason = 2 [default = NETWORK_DISCONNECT_INVALID];
}

Expand Down
2 changes: 1 addition & 1 deletion protos/usercmd.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message CSubtickMoveStep {

message CBaseUserCmdPB {
optional int32 command_number = 1;
optional int32 tick_count = 2;
optional int32 client_tick = 2;
optional .CInButtonStatePB buttons_pb = 3;
optional .CMsgQAngle viewangles = 4;
optional float forwardmove = 5;
Expand Down
59 changes: 47 additions & 12 deletions protos/usermessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ enum EBaseUserMessages {
UM_RequestDiagnostic = 162;
UM_DiagnosticResponse = 163;
UM_ExtraUserData = 164;
UM_NotifyResponseFound = 165;
UM_PlayResponseConditional = 166;
UM_MAX_BASE = 200;
}

Expand Down Expand Up @@ -103,6 +105,10 @@ enum PARTICLE_MESSAGE {
GAME_PARTICLE_MANAGER_EVENT_UPDATE_TRANSFORM = 27;
GAME_PARTICLE_MANAGER_EVENT_FREEZE_TRANSITION_OVERRIDE = 28;
GAME_PARTICLE_MANAGER_EVENT_FREEZE_INVOLVING = 29;
GAME_PARTICLE_MANAGER_EVENT_ADD_MODELLIST_OVERRIDE_ELEMENT = 30;
GAME_PARTICLE_MANAGER_EVENT_CLEAR_MODELLIST_OVERRIDE = 31;
GAME_PARTICLE_MANAGER_EVENT_CREATE_PHYSICS_SIM = 32;
GAME_PARTICLE_MANAGER_EVENT_DESTROY_PHYSICS_SIM = 33;
}

enum EHapticPulseType {
Expand Down Expand Up @@ -487,6 +493,16 @@ message CUserMsg_ParticleManager {
optional uint32 entity_handle = 3 [default = 16777215];
}

message AddModellistOverrideElement {
optional string model_name = 1;
optional float spawn_probability = 2;
optional uint32 groupid = 3;
}

message ClearModellistOverride {
optional uint32 groupid = 1;
}

message SetParticleNamedValueContext {
message FloatContextValue {
optional uint32 value_name_hash = 1;
Expand Down Expand Up @@ -515,6 +531,13 @@ message CUserMsg_ParticleManager {
repeated .CUserMsg_ParticleManager.SetParticleNamedValueContext.EHandleContext ehandle_values = 4;
}

message CreatePhysicsSim {
optional string prop_group_name = 1;
}

message DestroyPhysicsSim {
}

required .PARTICLE_MESSAGE type = 1 [default = GAME_PARTICLE_MANAGER_EVENT_CREATE];
required uint32 index = 2;
optional .CUserMsg_ParticleManager.ReleaseParticleIndex release_particle_index = 3;
Expand Down Expand Up @@ -546,6 +569,10 @@ message CUserMsg_ParticleManager {
optional .CUserMsg_ParticleManager.UpdateParticleTransform update_particle_transform = 30;
optional .CUserMsg_ParticleManager.ParticleFreezeTransitionOverride particle_freeze_transition_override = 31;
optional .CUserMsg_ParticleManager.FreezeParticleInvolving freeze_particle_involving = 32;
optional .CUserMsg_ParticleManager.AddModellistOverrideElement add_modellist_override_element = 33;
optional .CUserMsg_ParticleManager.ClearModellistOverride clear_modellist_override = 34;
optional .CUserMsg_ParticleManager.CreatePhysicsSim create_physics_sim = 35;
optional .CUserMsg_ParticleManager.DestroyPhysicsSim destroy_physics_sim = 36;

extensions 100 to 201;
}
Expand Down Expand Up @@ -577,18 +604,6 @@ message CUserMessageAnimStateGraphState {
optional bytes data = 2;
}

message CUserMessageCommandQueueState {
message command_queue_info_t {
optional uint32 commands_queued = 1;
optional uint32 command_queue_desired_size = 2;
optional uint32 starved_command_ticks = 3;
optional int32 time_dilation_percent = 4;
}

optional int32 player_slot = 1 [default = -1];
optional .CUserMessageCommandQueueState.command_queue_info_t command_queue_info = 2;
}

message CUserMessageUpdateCssClasses {
optional int32 target_world_panel = 1;
optional string css_classes = 2;
Expand Down Expand Up @@ -752,3 +767,23 @@ message CUserMessage_ExtraUserData {
repeated bytes detail1 = 4;
repeated bytes detail2 = 5;
}

message CUserMessage_NotifyResponseFound {
message Criteria {
optional uint32 name_symbol = 1;
optional string value = 2;
}

optional int32 ent_index = 1 [default = -1];
optional string rule_name = 2;
optional string response_value = 3;
optional string response_concept = 4;
repeated .CUserMessage_NotifyResponseFound.Criteria criteria = 5;
}

message CUserMessage_PlayResponseConditional {
optional int32 ent_index = 1 [default = -1];
repeated int32 player_slots = 2;
optional string response = 3;
optional .CMsgVector ent_origin = 4;
}
22 changes: 14 additions & 8 deletions src/DemoFile.SdkGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,9 @@ private static void WriteEntityFactoriesLookup(IEnumerable<string> networkClasse
alignment switch
{
1 => "byte",
2 => "ushort",
4 => "uint",
8 => "ulong",
2 => "short",
4 => "int",
8 => "long",
_ => throw new ArgumentOutOfRangeException(nameof(alignment), alignment, null)
};

Expand All @@ -751,17 +751,23 @@ private static void WriteEnum(StringBuilder builder, string enumName, SchemaEnum
var maxValue = schemaEnum.Align switch
{
1 => byte.MaxValue,
2 => ushort.MaxValue,
4 => uint.MaxValue,
8 => ulong.MaxValue,
2 => short.MaxValue,
4 => int.MaxValue,
8 => long.MaxValue,
_ => throw new ArgumentOutOfRangeException()
};

// Write enum items
foreach (var enumItem in schemaEnum.Items)
{
var value = enumItem.Value < maxValue ? enumItem.Value : maxValue;
builder.AppendLine($" {enumItem.Name} = 0x{value:X},");
if (enumItem.Value < 0)
{
builder.AppendLine($" {enumItem.Name} = {enumItem.Value},");
}
else
{
builder.AppendLine($" {enumItem.Name} = 0x{enumItem.Value:X},");
}
}

builder.AppendLine("}");
Expand Down
Loading

0 comments on commit f2955d9

Please sign in to comment.