Skip to content

Releases: markus-wa/demoinfocs-golang

v2.13.0

27 Jan 19:10
d8f5cb9
Compare
Choose a tag to compare

Support for encrypted net-messages 🥳

This means we can now read chat messages from Valve Matchmaking demos! (and more!)

Main PR: #323

New Features

Example

package main

import (
	"io/ioutil"
	"log"
	"os"

	dem "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs"
	"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/events"
)

func checkErr(err error) {
	if err != nil {
		panic(err)
	}
}

func main() {
	infoF, err := os.Open("test/cs-demos/match730_003528806449641685104_1453182610_271.dem.info")
	checkErr(err)

	b, err := ioutil.ReadAll(infoF)
	checkErr(err)

	k, err := dem.MatchInfoDecryptionKey(b)
	checkErr(err)

	f, err := os.Open("test/cs-demos/match730_003528806449641685104_1453182610_271.dem")
	checkErr(err)

	defer f.Close()

	cfg := dem.DefaultParserConfig
	cfg.NetMessageDecryptionKey = k

	p := dem.NewParserWithConfig(f, cfg)

	p.RegisterEventHandler(func(message events.ChatMessage) {
		log.Println(message)
	})

	err = p.ParseToEnd()
	checkErr(err)
}

v2.12.2

26 Jan 12:33
14c6b60
Compare
Choose a tag to compare

Fixes

  • Fixed ParseToEnd() not returning errors that happen during SyncAllQueues()
  • Fixed RankUpdate event failing to get the correct player instance when a player re-connected during the game

v2.12.1

17 Jan 13:32
744066d
Compare
Choose a tag to compare

Fixes

  • Changed EquipmentType.String() human readable name for EqP250 from p250 to P250

v2.12.0

21 Oct 22:05
ce1ecd5
Compare
Choose a tag to compare

New Features

  • Added ParserConfig.IgnoreErrBombsiteIndexNotFound flag to ignore errors about bombsite indexes that can't be found (#315 - see also #314)

v2.11.1

17 Oct 12:29
b2c45b1
Compare
Choose a tag to compare

Fixes

  • fixed BombPlantBegin.Site always being BombsiteA for new demos (#313)

v2.11.0

15 Oct 09:07
041838a
Compare
Choose a tag to compare

New Features

v2.10.1

12 Aug 12:40
7d87848
Compare
Choose a tag to compare

Fixes

  • common: fix panic when player_connect.networkid is malformed or missing

v2.10.0

15 Jul 10:18
b0d84be
Compare
Choose a tag to compare

Changes

  • Return error for Parser.Close() if closing underlying resources fails (i.e. when closing the bit-reader)

Fixes

  • Fixed (hopefully) an issue where the parser would not work with io.Reader's that don't have all data available from the beginning (e.g. HTTP streaming or Gzip) - see #299

v2.9.1

18 Jun 16:50
063eaf0
Compare
Choose a tag to compare

New Features

  • Added map scale + translations for de_ancient, de_office and de_agency (#302 - thanks @srjnm)

v2.9.0

04 Jun 19:48
5a23bf9
Compare
Choose a tag to compare

New Features

  • Added Player.PositionEyes() - returns player position with Z value on eye/view height

Fixes

  • Fixed documentation of Player.Position() - it does not match cl_showpos 1 contrary to what it said before