Closed xGuysOG closed 5 months ago
I found similar issue with Source1PlayerFootstepEvent
, it fires on 2 seconds interval, whereas in new demos Source1PlayerSoundEvent
is used instead, and it fires constantly.
Not sure if it's related to this one, or is it a bug in library at all. It could be a bug on server-side. Client technically doesn't need this event, he can check the blind state in CCSPlayerPawn.FlashDuration
.
Anyways, this should be tried with other parsing libraries, to see if they give the same behavior.
I found similar issue with
Source1PlayerFootstepEvent
, it fires on 2 seconds interval, whereas in new demosSource1PlayerSoundEvent
is used instead, and it fires constantly.Not sure if it's related to this one, or is it a bug in library at all. It could be a bug on server-side. Client technically doesn't need this event, he can check the blind state in
CCSPlayerPawn.FlashDuration
.Anyways, this should be tried with other parsing libraries, to see if they give the same behavior.
I guess, i know that the javascript parses on cs2lense and noesis use this event to track it.
I use it to get stats on how often players blind people and for how long, its the only real way to get it that I've found other then getting the "FlashbangDetonate" and then getting all players in that moment and getting if they are blind which seems very very bad.
I guess, i know that the javascript parses on cs2lense and noesis use this event to track it.
Then it's probably a bug in this library.
@saul Any chance you will get to look at this anytime soon?
This still isn't ideal, but should be robust enough. If you're concerned about multiple flashbangs going off on the same tick, you can add a radius check. But this should suffice:
var flashQueue = new List<CCSPlayerPawn>();
demo.EntityEvents.CCSPlayerPawn.AddChangeCallback(
p => p.FlashDuration,
(p, _, newFlashDuration) =>
{
if (newFlashDuration > 0)
{
flashQueue.Add(p);
}
});
demo.Source1GameEvents.FlashbangDetonate += e =>
{
Console.WriteLine($"Flashbang detonated at {e.X},{e.Y},{e.Z} by {e.PlayerPawn}:");
foreach (var pawn in flashQueue)
{
Console.WriteLine($" - {pawn} - {pawn.FlashDuration} secs");
}
flashQueue.Clear();
};
I don't believe this is a bug in the library - in the demo you linked, player_blind
is simply never recorded.
Hope that helps
Research
Description
It seems that there must be some issue with the "PlayerBlind" event not always being parsed correctly from a demo, as it gets called in some demos and on some it dosnt, it seems that the "FlashbangDetonate" event gets called every time so just seems like a parsing issue on your side, but i could be wrong. below ive attached 1 that works and 1 that dosnt that i used in my test.
Code to reproduce
Affected demos
https://drive.google.com/drive/folders/1VdU7tr2s_4SV_EHUOViCJm4AUWxNzvDy?usp=sharing