Go Get
go get -u github.com/markus-wa/demoinfocs-golang/v6/pkg/demoinfocs@v6.0.0-alpha.1
To upgrade from v5, this may be useful to update import paths (use at your own risk):
sed -i 's/demoinfocs-golang\/v5/demoinfocs-golang\/v6/' **/*.go
See the v6.0.0-alpha.0 release notes for the full list of changes since v5 (import path /v5 → /v6, Go 1.27 requirement, etc.).
Breaking Changes
PlayerHurt.HealthDamageTakenis now the HP actually removed (health before the hit minus reported post-hit health) for every hit, not just fatal ones, by @markus-wa in #700- On many demos a hit removes
dmg_healthordmg_health + 1HP. This depends on the server build: it shows up on demos from 2023 to 2026, but not on all of them.HealthDamageTakennow matches the game's own damage stats (m_pActionTrackingServices.m_iDamage,round_statsinserver.log) in 7,223 of 7,230 player-rounds over a 41-demo corpus (the remaining 7 areplayer_hurtevents the GOTV recording dropped) - ADR computed from
HealthDamageTakenwill be ~1% higher than HLTV's on affected demos. UseHealthDamage(the rawdmg_health) to reproduce HLTV numbers
- On many demos a hit removes
BombExplodeis no longer dispatched when the server shuts down a planted bomb without detonating it (e.g. a few ticks after a round is decided at half-time, overtime start or map end) by @markus-wa in #701 — the event now keys offCPlantedC4.m_bHasExploded, matching the nativebomb_explodedcount exactly in all 41 corpus demos (previously 17 spurious explosions across 12 demos)- The
v5line continues to be maintained on thev5branch for users not ready to upgrade
New Features
- Decrypt encrypted net-messages in CS2 demos (chat messages in Valve matchmaking demos are encrypted since the Sept 2026 CS2 update) by @blinkzz in #696 and @markus-wa in #697, ported to v6 in #699
- new
ParserConfig.NetMessageDecryptionKey— set it to the key from thematch730_*.dem.infofile, whichMatchInfoDecryptionKey()extracts for you - new
ParserWarntypesWarnTypeMissingNetMessageDecryptionKey(encrypted message seen, no key configured) &WarnTypeCantReadEncryptedNetMessage CSVCMsg_EncryptedDatais also exposed as a regular net-message forRegisterNetMessageHandler- ⚠️ alpha caveat: there is no encrypted CS2 demo in the test suite yet, so this path is not covered by automated tests — please report any issues with encrypted demos (a wrong key currently fails the parse instead of just warning)
- new
- Updated proto messages (
svc_EncryptedData,CSVCMsg_VoiceData.caster,textallchat,CS_UM_*_CSGOLegacyrenames,CCSUsrMsg_CustomHudClicked) in #699
Fixes
- Fix player name changes being reverted after a reconnect &
Playing()returning the same*Playertwice when a bot name is re-used on CS2 GOTV demos (regression in v6.0.0-alpha.0, reported by @billfreeman44 in #692) by @markus-wa in #693- restores the userinfo string-table guard against the GOTV proxy re-sending stale pre-reconnect userinfo, while keeping alpha.0's mid-match broadcast user-id mapping fix
player_connectnow syncs the authoritative name onto the player object & dispatchesPlayerNameChange- bot controller → raw-player matching is slot-first and deterministic
- Fix nil
Entity/OwneronWeaponInstanceof thrown grenades (GrenadeProjectileThrow, mimickedWeaponFire; #580) by @markus-wa in #688 — CS2 destroys the weapon entity before the projectile is created, so the last-known weapon of that type is used as a fallback (nilEntitywent from 9–42% of throws per demo to 0) - Fix
Equipment.Silenced()panicking with a nil pointer dereference on equipment whose class has nom_bSilencerOn(defuse kit, kevlar, helmet, NVG) by @youdie006 in #695
Changes
- Performance: reduce parse hotspots (snappy destination reuse, field-path huffman peek table, less decoder boxing) by @markus-wa in #691 — ~12% faster, ~19% less memory and ~3% fewer allocs/op vs. v6.0.0-alpha.0 on
BenchmarkDemoInfoCs - CI: least-privilege workflow permissions in #690, OSV-Scanner dependency vulnerability scanning in #689, CSDA step disabled until it migrates to v6 by @akiver in #694
- Dependency updates:
ice-cipher-gov1.0.0 (new, for net-message decryption),gobitreadv0.2.5, x/image 0.45.0, x/text 0.41.0
New Contributors
- @blinkzz made their first contribution in #696
- @youdie006 made their first contribution in #695
Full Changelog: v6.0.0-alpha.0...v6.0.0-alpha.1