bz_ePlayerDieEvent kill tracking issue

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
User avatar
Zehra
Private First Class
Private First Class
Posts: 618
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic

bz_ePlayerDieEvent kill tracking issue

Post by Zehra » Thu Jan 03, 2019 1:47 am

Currently we can track kills made by players rather easily with this event and thus PlayHistoryTracker and various other plug-ins are able to take advantage of this feature, however, this does not seem to take into account 'non-player' kills which are assigned to players.

Is there a way to possibly track the data from those reassigned kills?

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
There's always something to remember and it's been a game I love. ~Zehra
The time spent is a time which can never be regained, so it's a time to enjoy. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 762
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: bz_ePlayerDieEvent kill tracking issue

Post by allejo » Thu Jan 03, 2019 8:18 am

Currently, I don't believe there is. bz_ePlayerDieEvent can be modified by any loaded plug-in and the server won't know if the event has been modified until every plug-in listening to the event has finished. However, the server itself must know if any plug-in has modified the event so that it can update the player death packet before it's broadcasted. So it possible to have a new notification event on this modification. What are you trying to achieve with this information?
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
Zehra
Private First Class
Private First Class
Posts: 618
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic

Re: bz_ePlayerDieEvent kill tracking issue

Post by Zehra » Thu Jan 03, 2019 8:08 pm

I'm trying to track both actual kills made by players and one attributed to players.
As in the case of PlayHistoryTracker, it works well tracking actual kills, but server shots made on the behalf of players do not end up being attributed to them. Examples of this include Useless Mines, Grenade, and various other plug-ins which use server shots.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
There's always something to remember and it's been a game I love. ~Zehra
The time spent is a time which can never be regained, so it's a time to enjoy. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 762
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: bz_ePlayerDieEvent kill tracking issue

Post by allejo » Fri Jan 04, 2019 1:50 am

Zehra wrote:
Thu Jan 03, 2019 8:08 pm
I'm trying to track both actual kills made by players and one attributed to players.
Is this specifically for a plug-in you're building? If so, what are you doing?
Zehra wrote:
Thu Jan 03, 2019 8:08 pm
As in the case of PlayHistoryTracker, it works well tracking actual kills, but server shots made on the behalf of players do not end up being attributed to them. Examples of this include Useless Mines, Grenade, and various other plug-ins which use server shots.
This sounds more of a bug that should be fixed in bzfs so plugins like PlayHistoryTracker would respect attributed kills.
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
Zehra
Private First Class
Private First Class
Posts: 618
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic

Re: bz_ePlayerDieEvent kill tracking issue

Post by Zehra » Sat Jan 05, 2019 1:39 am

allejo wrote:
Fri Jan 04, 2019 1:50 am
Is this specifically for a plug-in you're building? If so, what are you doing?
Yes, it is part of a plug-in I'm working on.

The code which applies to the subject:

Code: Select all

bz_PlayerDieEventData_V2 *deathData = (bz_PlayerDieEventData_V2*)eventData;
                
		if ((deathData->killerID) != (deathData->playerID)) { // Prevent self-kills from causing increments to array
                  someArray[deathData->killerID]++;
                }        
Along with:

Code: Select all

someArray[deathData->playerID] = 0;
Now of course, this does not collect the 'reassigned' ID's from the 'bz_ePlayerDieEvent'.
Although I wasn't aware of any event which provided additional data on the death event or changing of player or killer ID's, which would have provided the data needed.
allejo wrote:
Fri Jan 04, 2019 1:50 am
This sounds more of a bug that should be fixed in bzfs so plugins like PlayHistoryTracker would respect attributed kills.
The plug-in worked a lot like PlayHistoryTracker, but the main difference was PlayHistoryTracker was always intended to track 'actual' kills vs 'attributed' kills.
My plug-in was focused on doing both, but it probably would not work so well in PlayHistoryTracker, unless it was made an option, so I wouldn't consider it an actual bug, but mostly the lack of a feature for my plug-in and perhaps something which would be a good option for PlayHistoryTracker.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
There's always something to remember and it's been a game I love. ~Zehra
The time spent is a time which can never be regained, so it's a time to enjoy. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.

Post Reply