StatsHelix / demoinfo

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

Blind event #121

Closed econoraptor closed 6 years ago

econoraptor commented 7 years ago

This will break current usage of FlashedPlayers. If that's an issue, I can reimplement FlashedPlayers using the Blind event. The current implementation is broken as detailed in issue #120.

This creates a new Blind event for when players are flashed and removes FlashedPlayers from FlashEventArgs. Additionally, it restricts Blind events to players who aren't spectators. The new BlindEventArgs includes an Attacker field, which allows a user to match FlashEventArgs.ThrownBy with BlindEventArgs.Attacker. It also includes a FlashDuration field.

moritzuehling commented 7 years ago

What I don't like about this is that it breaks the API when it doesn't need to - would you mind re-adding the FlashedPlayers-Property to the FlashEventArgs, so old code depending on this API still works?

econoraptor commented 6 years ago

FlashedPlayers should now be exactly how it is in master.