Page MenuHomeFeedback Tracker

lastEntityCausingDamage only stores damage instigator
New, NormalPublic

Description

Engine only stores instigator as lastEntityCausingDamage from getEntityInfo ignoring source so half of the damage source info is lost for Killed event handler.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Engine
Steps To Reproduce
  1. Launch attached mission
  2. Quickly shoot a tank in front of you in a front headlight
  3. Observe lastEntityCausingDamage having player unit
  4. Wait until tank explodes
  5. Check RPT for HandleDamage event logs before death, notice it includes both source and instigator (Offroad and unit)
  6. Check RPT for Killed event log, notice it only includes unit (damage instigator) as source and no instigator
Additional Information

Extra issue:
Observe HandleDamage event logs with FuelExplosionBig after death, they also use instigator unit as source, I think this should be changed to source being vehicle that explodes and instigator the unit that triggered the destruction and explosion.