When Weapon::Fire is used to fire a gun on server, then the damage done by consecutively fired shots sometimes gets applied to a previously hit entity (this is also true for the associated firearm effects like blood splatter etc), especially if that entity died from a previously fired shot. The wrongly damaged entity can even be hundreds of meters away or behind objects that are not penetrable by projectiles, which seems to indicate that the damage is just applied to some cached reference of that previously hit entity.
As a side note, tracing the actual projectile trajectory also indicates that the projectile indeed does travel in the intended direction and not to the entity that wrongly receives the damage, which seems to indicate the fired projectile itself is probably not the issue.
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Modding
Steps To Reproduce
- Spawn an entity like a zombie at a specific position
- Use a gun's Fire method in script on server to fire a shot at the zombie, killing it (use a gun with high enough damage to make this easier, e.g. an SVD or FAL)
- After the zombie is dead, spawn another one at a different position, ideally to the left or right of the previous one, and repeat the above.
- Repeat until the fired shot damages a previously killed zombie that is not in the direction the shot was fired (visible by blood splatter showing on that previously killed zombie, and when logging EEOnDamageCalculated, also indicating that it was indeed receiving the damage), while the zombie in the direction the shot was actually fired will not receive any damage