AI Headshots not counted properly (Split thread)

Carp!

Well-Known Member
Just an update. Headshots are not being counted on the AI still. Zombies are working fine though.
 
Hey for what its worth, I found the reason behind my headshot issue. Looks like when I headshoot AI with an AS50 it does not count. If I shoot a zombie anywhere on the body it DOES count. Which makes sense because it does so much damage it probably registers as a headshot.
 
The way damage is handled by Arma2, each instance of damage (ie: each bullet hit) is handled 5 times, so the DZAI damage handler script is fired 5 times for each time an AI unit is hit by a bullet. The first instance of damage applied is the "overall" damage, followed by "head" damage, then body, hands and legs.

If the damage from the "overall" damage alone is enough to outright kill the AI unit, the AI death script is run right there and then and then prevented from firing again for the other 4 damage types. That is why a highly damaging gunshot is not counted as a headshot.

Long story short - this will be fixed in an upcoming update by moving a bit of code from one place to another. I am not 100% certain it will be fixed but fingers are crossed.
 
I don't know if this is the best place to put this anymore, but since we mentioned it above... I updated to 1.9.4 today and confirmed that high damaged weapons do not cause headshots to count still. All other weapons still work though.
 
Thanks for the report. I'll try and look for another way to fix this.

Sent from my Nexus 5 using Tapatalk
 
Question: whenever the headshot is not counted, does Study Body show the cause of death as a headshot or bleeding?

If my guess is correct, then with the way the handle damage eventhandler is set up, it will be impossible/very difficult to have headshot counting 100% perfectly working. For DZAI, the eventhandler is removed immediately after death so the server doesn't have to waste time calculating blood damage for a unit that's already dead. For a player client, the eventhandler continues to exist so headshots are properly counted even if the headshot damage isn't actually responsible for killing the unit. The player character has ownership transferred to the server after death so this wouldn't cause any troubles, but for AI units this would.

I'll keep thinking about a solution to this however. It may just take some time.
 
Well here is something interesting. I was able to kill 5 bandits in the head and study body shows blood loss. The 6th one I shot at the very top portion of the head (the hat he was wearing) and it counted as a headshot. All 6 were from the same spawn group so Im wondering if its just part of the head, but that would be silly :p I havent been able to recreate it. The one headshot did show as shot to the head and did count on the monitor.
 
Back
Top