github markus-wa/demoinfocs-golang v6.0.0-rc.1

pre-release3 hours ago

Go Get

go get -u github.com/markus-wa/demoinfocs-golang/v6/pkg/demoinfocs@v6.0.0-rc.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

Coming from v5? Read the v6.0.0-rc.0 release notes. They list every change since v5.2.0 and include a migration table. This release only adds the fix below.

This is a small release candidate with one fix: a panic in the new InfernoFireOut tracking that could abort the whole parse.

Fixes

  • Fix a panic in InfernoFireOut tracking that aborted parsing with ErrDecodeFailed by @markus-wa in #759. This was reported on a CS2 POV demo
    • The check whether an inferno's flames are still burning runs every frame for every inferno, since events.InfernoFireOut was added in v6. It read m_fireCount and m_bFireIsBurning.NNNN without checking them, so a property without a value panicked inside the parser
    • Properties without a value were never sent and hold their default value. This happens, for example, after an entity re-enters the PVS on a POV demo, where the flag of a fire that has already gone out isn't sent again. Such a count now counts as 0 and such a flag as not burning, so InfernoFireOut still fires once the last burning fire goes out
    • Inferno.Fires() treats properties without a value the same way. A missing m_fireX/Y/ZDelta counts as 0 instead of panicking, and a fire whose absolute m_firePositions has no value is left out
    • Inferno.Thrower() returns nil instead of panicking when no thrower is cached and m_hOwnerEntity has no value. The doc comment already allowed nil
    • InfernoStart and InfernoFireOut counts are unchanged on 41 GOTV demos and on pov.dem

Full Changelog: v6.0.0-rc.0...v6.0.0-rc.1

Discussions / Chat / Announcements

Discord Chat

Don't miss a new demoinfocs-golang release

NewReleases is sending notifications on new releases.