Skip to content

v5.0.0

Choose a tag to compare

@Igor-Losev Igor-Losev released this 26 Oct 21:56
· 61 commits to main since this release
8cb3afe

Breaking Changes

  • Renamed the deadem package to @deademx/deadlock.

  • Moved UMD globals under the deadem namespace (e.g. window.deadem.cs2, window.deadem.dota2, window.deadem.deadlock).

  • Replaced protobufjs with a built-in decoder. Consequences:

    • Changed 64-bit integers to bigint (instead of Long / strings).
    • Removed underscores from field names (e.g. Dota 2 playerid_1 → playerid1).
  • Entity Fields:

    • Prefixed names with the send node (e.g. m_iGoldNetWorth → m_PlayerDataGlobal.m_iGoldNetWorth).
    • Changed MatchID_t and Dota 2 itemid_t to bigint.
  • Replaced StringTableEvent subscriptions with the STRING_TABLE interceptor stage.

  • Made Player.nextTick() synchronous.

New Features

  • Added TypeScript declarations.
  • Added the STRING_TABLE interceptor stage.
  • Extended the public API of packets, string tables and their types.

Improvements

  • Added support for strict CSP environments.
  • Sped up parsing: Deadlock +60%, CS2 +31%, Dota 2 +37%.
  • Sped up Player steps and seeks.
  • Reduced minified bundles: Deadlock −12%, CS2 −14%, Dota 2 −16%.

Regressions

  • Peak RSS increased: Deadlock 189 → 232 MB, Dota 2 277 → 429 MB.

Bug Fixes

  • Field Decoding:

    • Fixed large signed integers off by 2^31 (zigzag).
    • Fixed signed types read as unsigned: CEntityIndex, GameTick_t, CPlayerSlot, Deadlock NPC_STATE, Dota 2 PlayerID_t and AbilityID_t.
    • Fixed Dota 2 MatchID_t and itemid_t truncated to 32 bits.
    • Fixed HSequence off by one.
    • Fixed ammo counts in CS2 m_iClip1, m_iClip2 and Deadlock m_iClip, m_iBonusClip.
    • Fixed 32-bit QAngle read as zeros.
    • Fixed quantized float rounding and range (crashes on some CS2 demos).
    • Fixed CUtlBinaryBlock read as text.
    • Added missing Quaternion, CTransform and CGlobalSymbol decoders.
    • Fixed unset send table field attributes read as 0 (no value changes).
  • Entity State:

    • Fixed a crash on some older CS2 demos (PVS bits).
    • Fixed entities re-created and losing fields at DEM_FullPacket.
    • Fixed stale elements of shrunk arrays (unpackFlattened() and getField() could return removed values).
    • Fixed CS2 view models created from a foreign baseline (wrong owner and model in older demos).
  • String Tables:

    • Fixed empty keys of updated entries and wrong keys in newer builds.
    • Fixed tables jumping ahead at DEM_FullPacket.
  • User Commands:

    • Fixed nested state messages missing their defaults.
    • Fixed deltas dropping trailing repeated elements (CS2 subtick moves).
  • Player:

    • Fixed play() accepting invalid rates (zero, negative or non-finite).
    • Fixed getStats().performance counting idle seek time as PARSER.
  • Broadcast:

    • Fixed BroadcastAgent.stop() not stopping polling.
    • Fixed BroadcastAgent polling after its stream is closed (for example parser.abort() on a broadcast).
    • Fixed a failing broadcast gateway causing an unhandled rejection.

Schema

  • Updated protobuf schema.
  • Added message types:
    • Shared: svc_EncryptedData, GE_ClearDecalsForEntityEvent, GE_ClothStiffenAnimEvent, GE_ClothEffectAnimEvent.
    • Deadlock: MusicQueue, CombatLogEntry, CombatLogBulkData, PlayerTyping, SoulBagPickup, HeroReleaseVote.
    • Dota 2: TidehunterArcanaProgress_Ravages, TidehunterArcanaProgress_Fish.
  • Removed message types:
    • Shared: EM_RemoveAllDecals.
    • Deadlock: AG2ParamTrigger.
  • Added string table types: Deadlock COMBAT_LOG_NAMES, Dota 2 UNIT_NAMES.

Examples

  • Updated scripts for 5.0.

Documentation

  • Rewrote the documentation.

Internal

  • Added @deademx/tools for internal repository scripts.
  • Added CI checks for generated protos and published types.