Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Missing hurt events #130

Open
WillBrindle opened this issue Oct 20, 2017 · 3 comments
Open

Missing hurt events #130

WillBrindle opened this issue Oct 20, 2017 · 3 comments

Comments

@WillBrindle
Copy link

Hi,

Sometimes I am missing player hurt events. Probably 2 or 3 a match. I will try to give as concise steps as possible using the demo I noticed this with: https://www.hltv.org/matches/2307519/faze-vs-sk-eleague-major-2017

I am using this demo file (download gotv demo). Everything looks good for the first 4 rounds. In the 5th round, coldzera gets a 4k on the force buy. However, in order to kill kioshima it takes 4 shots (-34, -34, -27, -34 (kio was on 5hp)). You can see it in the youtube video too: https://www.youtube.com/watch?v=MXm8v-hj3Rw starting at 8:15. You might want to play at 0.25 speed to see it properly if you're using the youtube video instead of the actual demo.

Through the simplest possible code of just adding a listener to PlayerHurt and printing who hurt who for how much damage. I am missing the -27 shot. I have tried stepping through a little bit further up but could not see anything obvious.

I am happy to help look into this if someone can provide pointers. I am fairly sure there are other instances of it too, this was just the first one in that match I came across. I could not see anything obviously different about that shot to others.

@econoraptor
Copy link
Contributor

There's a fair bit of missing event data nowadays. My guess is it's due to the fact that they're being recorded at a lower tickrate than the server.

@WillBrindle
Copy link
Author

WillBrindle commented Oct 23, 2017

So is this purely down to server being 128 tick and the demo being 32 tick, and that event simply doesn't exist in the demo file? I can do some investigation into that later if we're not sure. I did see the health drop down in the demo to 32; but perhaps that's just because the next tick the player's health is lower but there was no explicit event for who inflicted that damage? That said, ADR is correctly calculated in the demo so there must be a way to know who did that damage.

Would this apply to other events; most importantly kills?

@econoraptor
Copy link
Contributor

econoraptor commented Oct 23, 2017

I don't know if it's because of the difference in tick rate or if there's merely a correlation. For instance, it could be due to the fact that demos recorded at lower tickrates are from overworked machines that are recording multiple demos, which could cause issues.

Yes, it seems to apply to all events. For kills, I raise an event when AdditionalInformations is updated and I crossreference it with an internal count of kills. If the data doesn't match up, I interpolate what data I can that I usually associate with a kill event. You can see how I made the event here econoraptor/demoinfo@bfeae...econoraptor:68e8

Some general advice on dealing with these demos: Make your internal logic very robust to missing data, and don't assume any sort of consistent order for concurrent events. For example, just yesterday I fixed a bug in my program because I had assumed that teams would change sides prior to a RoundStart event, but in some overtime scripts they actually change after RoundStart.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants