Page MenuHomeFeedback Tracker

pvp Kills - source is incorrectly the same as target sometimes in scripts
Assigned, NormalPublic

Description

When a player dies we enter EEKilled() in scripts. As arguments we get the target (PlayerBase) and the source of death (Object) . Sometimes when a player kills another player the source will be the same as the target instead of the actual killer. This is incorrect and started to go wrong in patch 1.20. Before that it worked fine. the source should have been the killers PlayerBase. The only time the source should be the same as the killer is when the player run out of health due to starvation/bleed out etc or if he suicided (f11).

You can see this in the adminlogs where you will get the specific logs for when a player died of natural causes or suicide. Its in that scope "(player == source)"

the admin logs looks like following:

21:56:55 | Player "Hidden" (DEAD) (id=FGVmVTQ8NwPVhxMcOqWjsxSElEfJXxMi3ST4LQ-gSR4= pos=<8374.3, 4947.5, 140.5>)[HP: 0] hit by Player "metropoliten666" (id=kdKBUutz7Syg30RZYy9UFKPs1ZFJqixI2DVgiTmyqIA= pos=<8378.2, 4942.1, 140.1>) into Head(0) for 110 damage (Bullet_12GaugeSlug) with IZH-43 from 6.70112 meters
21:56:55 | Player "Hidden" (DEAD) (id=FGVmVTQ8NwPVhxMcOqWjsxSElEfJXxMi3ST4LQ-gSR4= pos=<8374.3, 4947.5, 140.5>) died. Stats> Water: 708.594 Energy: 1575.17 Bleed sources: 0

this is how logs should look when its pvp:
21:49:18 | Player "Sven" (DEAD) (id=h9m8432czgibcFiHdra8cnx0ASEQvPPV4yA7MVi6Rgc= pos=<3957.8, 8600.2, 308.4>) killed by Player "2pac" (id=_NGgE3a4lfU2GJGr8br4XHHyQWELp5vqfgIj7Tx9L0g= pos=<3960.5, 8598.8, 308.2>) with SSG 82 from 3.06566 meters

For vanilla this is mainly a problem for admins who is helping players solving ingame dayz issues.
For modding its a lot worse since we cant know what killed the player for sure and in many cases we cant find out who.

Details

Severity
Minor
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 10
Category
Modding
Steps To Reproduce

I cant tell you have to reproduce it exactly. but I have an example where it is done in this clip: https://youtu.be/xrczRCQruSc?t=25
Its when he kills the other player by shooting him in the hed with the double barreled.
This kill resulted in the bug where it thinks the source is the same as the targeted player.

Event Timeline

QuickZ created this task.Aug 7 2023, 1:24 AM
QuickZ edited Steps To Reproduce. (Show Details)
Geez changed the task status from New to Assigned.Aug 7 2023, 11:25 AM
QuickZ added a comment.EditedAug 7 2023, 1:58 PM

Since this only is confirmed in 1.20 and 1.21 I wonder if this is what has been fixed here?

This changelog (current experimental 1.22) dont make sense to me since a invoker already exist and gets invoked on every death. The problems is the argument in the source paramater sometimes being inaccurate. Wondering if you meant that the invoker have been fixed for this specific issue?