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
InfernoFireOuttracking that aborted parsing withErrDecodeFailedby @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.InfernoFireOutwas added in v6. It readm_fireCountandm_bFireIsBurning.NNNNwithout 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
InfernoFireOutstill fires once the last burning fire goes out Inferno.Fires()treats properties without a value the same way. A missingm_fireX/Y/ZDeltacounts as 0 instead of panicking, and a fire whose absolutem_firePositionshas no value is left outInferno.Thrower()returns nil instead of panicking when no thrower is cached andm_hOwnerEntityhas no value. The doc comment already allowed nilInfernoStartandInfernoFireOutcounts are unchanged on 41 GOTV demos and onpov.dem
- The check whether an inferno's flames are still burning runs every frame for every inferno, since
Full Changelog: v6.0.0-rc.0...v6.0.0-rc.1