Hitmarker sound effect issue (player datum)
- sometimes not triggering for local player sometimes due to bad 'player slot id' not determining local player correctly.
- bad hook when playing in splitscreen and someone punches something (or even causes damage?).
How are you currently handling the detection of a 'hit'? We could theoretically hook the damage decode and place it there if the damage-owner is the local player.
That however, can come with it's own de-sync issues where you'll fire and get the damage packet later hearing the sound after on your screen the bullet has actually impacted.
https://github.com/PermaNulled/cartographer/commit/ad4579d68b2e7dda7c1b988e7c34d7fcb479e0ca I fixed the hook here. Now I just need a reliable way to get player object datum.
With the new blamlib code in the development branch (reference Firefight and Grave Robber) you should be able to easily retrieve a player object (unit) datum in various ways, please review and close the issue if you've managed to correct this.
Quite old issue, but I did implement code to easily access player data. The hitmarker sound effect code was removed long time ago.