StatsHelix / demoinfo

A library to analyze CS:GO demos in C#
MIT License
322 stars 78 forks source link

feat: decode int64 #154

Closed akiver closed 5 years ago

akiver commented 5 years ago

Hi, since the 2018.12.06 update it looks like demos now contain int64. This PR handle int64 decoding based on the original demoinfogo code.

Tested with 2 demos from the new BR game mode and some de_ demos after the update.

It should fix #153

ZUBAT commented 5 years ago

@akiver Thanks, I took your fix for the test. Everything works.

ZUBAT commented 5 years ago

@akiver i have problem with demo after your fix. http://replay132.valve.net/730/003315639240544485393_2081569673.dem.bz2

System.Collections.Generic.KeyNotFoundException: Данный ключ отсутствует в словаре. в System.Collections.Generic.Dictionary`2.get_Item(TKey key) в DemoInfo.DP.Handler.GameEventHandler.Apply(GameEvent rawEvent, DemoParser parser) в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DP\Handler\GameEventHandler.cs:строка 247 в DemoInfo.GameEvent.Parse(IBitStream bitstream, DemoParser parser) в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DP\FastNetmessages\GameEvent.cs:строка 80 в DemoInfo.DP.DemoPacketParser.ParsePacket(IBitStream bitstream, DemoParser demo) в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DP\DemoPacketParser.cs:строка 42 в DemoInfo.DemoParser.ParseDemoPacket() в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DemoParser.cs:строка 679 в DemoInfo.DemoParser.ParseTick() в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DemoParser.cs:строка 659 в DemoInfo.DemoParser.ParseNextTick() в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DemoParser.cs:строка 564 в DemoInfo.DemoParser.ParseToEnd(CancellationToken token) в C:\MMBot\CSGODemoViewer\demoinfo\DemoInfo\DemoParser.cs:строка 549

akiver commented 5 years ago

@ZUBAT I tried with your demo without problems

moritzuehling commented 5 years ago

Thank you very much, looks great! I love how you matched all the different code-styles in the different files! :D

No, this is seriously great - thanks for the quick implementation!

andrelip commented 5 years ago

Can you provide a build? I don't have C# installed.