Why this patch has code for the crylink, hagar, rocket launcher, etc, etc if it is only for hitscan stats?
Do you have plans for including non-hitscan stats anytime soon?
If this is only for hitscan weapons, shouldn't be the client command something like "+showstats_hitscan" ?
Are we missing the minstanex weapon ?
I have the same concerns as terencehill about how to show these stats. I consider the following options:
* Show them in a new right or left bar showing only the weapon image and hit ratio, without text.
* Show the hit ratio over the weapon image in the hud
* Leave the board as is, but put it right below the scoreboard. This might require making the stats board a little smaller
I've patched the code and it works perfectly. But I'm very concerned about modularity. With this patch adding a new weapon would require changing code in many places, and it can be avoided. I will try to explain this concept just a little :
You #define MAX_WEAPONSTAT 16 in data/qcsrc/client/main.qh . Why not use WEP_COUNT ? (data/qcsrc/common/items.qh)
In data/qcsrc/client/View.qc you declare
- Code: Select all
float hitscan[6], acc[3], missed[3];
I think these arrays should be able to support all the available weapons, perhaps filling it with a value like "-1" for unsupported (or non hitscan) weapons. So, having something like this:
- Code: Select all
float hitscan[WEP_COUNT], acc[WEP_COUNT], missed[WEP_COUNT];
You can be able to know how many hits you made with the minstanex, reading acc[WEP_MINSTANEX - WEP_FIRST]
In short, you have constants for identifying weapons, how many weapons you have in the system and you provided a method for identifying which weapons are hitscan. This should be enough for tracking and displaying stats in the client dynamically. What I mean with "dynamic" is: the minstanex or any new hitscan weapon should be automatically displayed in the client.
Anyway I think you made an awesome work, this patch is quite huge for being your first contribution.
Cheers