[Committed]Weapon Accuracy Stats Patch

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

[Committed]Weapon Accuracy Stats Patch

Postby Icarus » Fri Dec 19, 2008 5:01 am

Heres the first patch for hitscan accuracy: http://www.pastie.org/342960

please give feedback.
Last edited by Icarus on Thu Jun 11, 2009 8:19 pm, edited 2 times in total.
Icarus
 

Postby GreEn`mArine » Fri Dec 19, 2008 10:10 am

for which SVN revision is that patch?
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby divVerent » Fri Dec 19, 2008 10:41 am

The patch consists mostly of re-indenting existing source :( I really cannot judge it in that state.

http://paste.debian.net/24035/ is a cleaned up version. Haven't had time to look at it yet.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby mand1nga » Fri Dec 19, 2008 2:43 pm

Awesome, you got it finished!

I'll test it during the weekend

Cheers
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby terencehill » Fri Dec 19, 2008 9:05 pm

It'd be nice if u explain us how to show the stats.
terencehill
Alien
 
Posts: 176
Joined: Thu Jul 10, 2008 10:33 pm
Location: Italy

Postby Icarus » Sat Dec 20, 2008 2:38 am

sorry about that: bind key "+showstats"
Icarus
 

Postby terencehill » Sat Dec 20, 2008 7:35 am

Dib, your patch is hard to apply for me, I get errors coz of the wrong paths of files (I use tortoiseSVN in WinXP) but i guess it causes troubles to other ppl on other systems too. U should find a way to generate the patch from the NexuizSVN directory, or from NexuizSVN/nexuiz, as u can see in the patch modified by Div.

Div...
u accidentally removed the code to modify main.qc and with your patch there was not the command +showstats defined :/
And i was using this one in the beginning...

Here is the link to the corrected version http://www.pastie.org/343797, it works fine in my SVN.


Talking about the content, I guess that maybe is better to place the stats on the bottom rather than on the top of the screen. After a game is ended, the scoreboard is always showed and when I active your stats, they are just over the scoreboard. The end of the game is the perfect moment to see the stats but all is confused and it isn't nice to see.
terencehill
Alien
 
Posts: 176
Joined: Thu Jul 10, 2008 10:33 pm
Location: Italy

Postby mand1nga » Sun Dec 21, 2008 12:55 pm

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
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby Icarus » Wed Dec 24, 2008 7:03 pm

here is the latest patch: http://www.pastie.org/346376
i believe you have to patch in the qcsrc folder.
now the the scoreboard goes away when you do +showhitscanstats
its been changed to +showhitscanstats
Icarus
 

Postby mand1nga » Sat Dec 27, 2008 2:36 am

I just can't use this patch, now I've spent a considerable time trying to fix it. Please try

Code: Select all
cd X/nexuiz/data/qcsrc/ && svn diff > stats.patch


If you are using cygwin you should install the svn package manually. Don't worry if you've modified another files in your working copy, thats easy to fix.
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron