A long time ago, NS2 had an awesome project called NS2Stats that gathered round stats for the servers running this mod, you could go on their website and look at the stats for the rounds you had played. One of those stats was accuracy. In the competitive scene, this has always been a number every player has obsessed with, of course, since otherwise they wouldn’t be competing.
I remember playing and wondering during certain periods of the game what my final accuracy would be, especially if I was having a good round. So because I was impatient and wanted that data before the round ended, I thought about incorporating something like that to my mod, at the time still called Custom HUD.
The first iteration was fully client-based, so all the information was from what the client believed it hit, instead of what the server was seeing, but it was still good enough for the impatients like me at the time. When you died, you’d get a message in console like this:
Because I was hooking into the damage function, and because of the way it works, some of the “weapons” weren’t being tracked, basically, any melee weapons wouldn’t count misses towards the stats, so most aliens would get 100% accuracy all the time. I wanted to address this, so while fixing this issue, I went for an extra step, the server-side.