Skip to content

Commit

Permalink
Log all unknown packet names.
Browse files Browse the repository at this point in the history
  • Loading branch information
abenea committed Feb 10, 2024
1 parent 3f6e42b commit 7c80f50
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions cs2-demo/proto/cs_gameevents.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enum ECsgoGameEvents {
GE_PlayerAnimEventId = 450;
GE_RadioIconEventId = 451;
GE_FireBulletsId = 452;
}
78 changes: 78 additions & 0 deletions cs2-demo/proto/cstrike15_usermessages.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
enum ECstrike15UserMessages {
CS_UM_VGUIMenu = 301;
CS_UM_Geiger = 302;
CS_UM_Train = 303;
CS_UM_HudText = 304;
CS_UM_SayText = 305;
CS_UM_SayText2 = 306;
CS_UM_TextMsg = 307;
CS_UM_HudMsg = 308;
CS_UM_ResetHud = 309;
CS_UM_GameTitle = 310;
CS_UM_Shake = 312;
CS_UM_Fade = 313;
CS_UM_Rumble = 314;
CS_UM_CloseCaption = 315;
CS_UM_CloseCaptionDirect = 316;
CS_UM_SendAudio = 317;
CS_UM_RawAudio = 318;
CS_UM_VoiceMask = 319;
CS_UM_RequestState = 320;
CS_UM_Damage = 321;
CS_UM_RadioText = 322;
CS_UM_HintText = 323;
CS_UM_KeyHintText = 324;
CS_UM_ProcessSpottedEntityUpdate = 325;
CS_UM_ReloadEffect = 326;
CS_UM_AdjustMoney = 327;
CS_UM_UpdateTeamMoney = 328;
CS_UM_StopSpectatorMode = 329;
CS_UM_KillCam = 330;
CS_UM_DesiredTimescale = 331;
CS_UM_CurrentTimescale = 332;
CS_UM_AchievementEvent = 333;
CS_UM_MatchEndConditions = 334;
CS_UM_DisconnectToLobby = 335;
CS_UM_PlayerStatsUpdate = 336;
CS_UM_WarmupHasEnded = 338;
CS_UM_ClientInfo = 339;
CS_UM_XRankGet = 340;
CS_UM_XRankUpd = 341;
CS_UM_CallVoteFailed = 345;
CS_UM_VoteStart = 346;
CS_UM_VotePass = 347;
CS_UM_VoteFailed = 348;
CS_UM_VoteSetup = 349;
CS_UM_ServerRankRevealAll = 350;
CS_UM_SendLastKillerDamageToClient = 351;
CS_UM_ServerRankUpdate = 352;
CS_UM_ItemPickup = 353;
CS_UM_ShowMenu = 354;
CS_UM_BarTime = 355;
CS_UM_AmmoDenied = 356;
CS_UM_MarkAchievement = 357;
CS_UM_MatchStatsUpdate = 358;
CS_UM_ItemDrop = 359;
CS_UM_GlowPropTurnOff = 360;
CS_UM_SendPlayerItemDrops = 361;
CS_UM_RoundBackupFilenames = 362;
CS_UM_SendPlayerItemFound = 363;
CS_UM_ReportHit = 364;
CS_UM_XpUpdate = 365;
CS_UM_QuestProgress = 366;
CS_UM_ScoreLeaderboardData = 367;
CS_UM_PlayerDecalDigitalSignature = 368;
CS_UM_WeaponSound = 369;
CS_UM_UpdateScreenHealthBar = 370;
CS_UM_EntityOutlineHighlight = 371;
CS_UM_SSUI = 372;
CS_UM_SurvivalStats = 373;
CS_UM_DisconnectToLobby2 = 374;
CS_UM_EndOfMatchAllPlayersData = 375;
CS_UM_PostRoundDamageReport = 376;
CS_UM_RoundEndReportData = 379;
CS_UM_CurrentRoundOdds = 380;
CS_UM_DeepStats = 381;
CS_UM_UtilMsg = 382;
CS_UM_ShootInfo = 383;
}
28 changes: 28 additions & 0 deletions cs2-demo/proto/te.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
enum ETEProtobufIds {
TE_EffectDispatchId = 400;
TE_ArmorRicochetId = 401;
TE_BeamEntPointId = 402;
TE_BeamEntsId = 403;
TE_BeamPointsId = 404;
TE_BeamRingId = 405;
TE_BSPDecalId = 407;
TE_BubblesId = 408;
TE_BubbleTrailId = 409;
TE_DecalId = 410;
TE_WorldDecalId = 411;
TE_EnergySplashId = 412;
TE_FizzId = 413;
TE_ShatterSurfaceId = 414;
TE_GlowSpriteId = 415;
TE_ImpactId = 416;
TE_MuzzleFlashId = 417;
TE_BloodStreamId = 418;
TE_ExplosionId = 419;
TE_DustId = 420;
TE_LargeFunnelId = 421;
TE_SparksId = 422;
TE_PhysicsPropId = 423;
TE_PlayerDecalId = 424;
TE_ProjectedDecalId = 425;
TE_SmokeId = 426;
}
59 changes: 59 additions & 0 deletions cs2-demo/proto/usermessages.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
enum EBaseUserMessages {
UM_AchievementEvent = 101;
UM_CloseCaption = 102;
UM_CloseCaptionDirect = 103;
UM_CurrentTimescale = 104;
UM_DesiredTimescale = 105;
UM_Fade = 106;
UM_GameTitle = 107;
UM_HudMsg = 110;
UM_HudText = 111;
UM_ColoredText = 113;
UM_RequestState = 114;
UM_ResetHUD = 115;
UM_Rumble = 116;
UM_SayText = 117;
UM_SayText2 = 118;
UM_SayTextChannel = 119;
UM_Shake = 120;
UM_ShakeDir = 121;
UM_TextMsg = 124;
UM_ScreenTilt = 125;
UM_VoiceMask = 128;
UM_SendAudio = 130;
UM_ItemPickup = 131;
UM_AmmoDenied = 132;
UM_ShowMenu = 134;
UM_CreditsMsg = 135;
UM_CloseCaptionPlaceholder = 142;
UM_CameraTransition = 143;
UM_AudioParameter = 144;
UM_ParticleManager = 145;
UM_HudError = 146;
UM_CustomGameEvent = 148;
UM_AnimGraphUpdate = 149;
UM_HapticsManagerPulse = 150;
UM_HapticsManagerEffect = 151;
UM_CommandQueueState = 152;
UM_UpdateCssClasses = 153;
UM_ServerFrameTime = 154;
UM_LagCompensationError = 155;
UM_RequestDllStatus = 156;
UM_RequestUtilAction = 157;
UM_UtilActionResponse = 158;
UM_DllStatusResponse = 159;
UM_RequestInventory = 160;
UM_InventoryResponse = 161;
UM_RequestDiagnostic = 162;
UM_DiagnosticResponse = 163;
UM_MAX_BASE = 200;
}

enum EBaseEntityMessages {
EM_PlayJingle = 136;
EM_ScreenOverlay = 137;
EM_RemoveAllDecals = 138;
EM_PropagateForce = 139;
EM_DoSpark = 140;
EM_FixAngle = 141;
}
4 changes: 3 additions & 1 deletion cs2-demo/src/demo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ impl DemoCommand {
impl fmt::Display for DemoCommand {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
DemoCommand::FileHeader(m) => write!(f, "FileHeader {}", m),
DemoCommand::FileHeader(m) => write!(f, "FileHeader {m}"),
DemoCommand::ClassInfo(m) => write!(f, "ClassInfo {m}"),
DemoCommand::FullPacket(st, p) => write!(f, "FullPacket {st}, {p:?}"),
DemoCommand::SendTables(_) => write!(f, "SendTables"),
_ => write!(f, "{:?}", self),
}
Expand Down
9 changes: 9 additions & 0 deletions cs2-demo/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ use protobuf::Message as protobuf_Message;
use crate::proto::gameevents::*;
use crate::proto::netmessages::*;
use crate::proto::networkbasetypes::*;
use crate::proto::cstrike15_usermessages::ECstrike15UserMessages;
use crate::proto::usermessages::{EBaseUserMessages, EBaseEntityMessages};
use crate::proto::te::ETEProtobufIds;
use crate::proto::cs_gameevents::ECsgoGameEvents;
use crate::read::ValveBitReader;
use crate::Result;

Expand Down Expand Up @@ -73,6 +77,11 @@ macro_rules! create_message_impl {
}

create_message_impl! {
(EBaseUserMessages, UM_, CUserMessage) => [],
(EBaseEntityMessages, EM_, CEntityMessage) => [],
(ECstrike15UserMessages, CS_UM_, CCSUsrMsg_) => [],
(ETEProtobufIds, TE_, CMsgTE) => [],
(ECsgoGameEvents, GE_, CMsgTE) => [],
(NET_Messages, net_, CNETMsg_) => [],
(SVC_Messages, svc_, CSVCMsg_) => [
ClearAllStringTables,
Expand Down
1 change: 0 additions & 1 deletion csdemoparser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tracing = ["dep:tracing-subscriber"]

[dependencies]
anyhow = { version = "1.0", features = ["backtrace"] }
byteorder = "1.4"
csgo-demo = { path = "../csgo-demo" }
cs2-demo = { path = "../cs2-demo" }
serde = { version = "1.0", features = ["derive"] }
Expand Down

0 comments on commit 7c80f50

Please sign in to comment.