[Committed]Weapon Accuracy Stats Patch

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators


  • 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
     

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

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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Dec 19, 2008 2:43 pm

  • Awesome, you got it finished!

    I'll test it during the weekend

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

Fri Dec 19, 2008 9:05 pm

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

Sat Dec 20, 2008 2:38 am

  • sorry about that: bind key "+showstats"
    Icarus
     

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.
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

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

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
     

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

Sat Dec 27, 2008 2:55 pm

  • patch: **** malformed patch at line 433: float tempdb;

    The patch is indeed broken. Looks like that pastebin site inserts empty lines somewhere. Try using a different site, like paste.debian.net.
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Dec 27, 2008 4:03 pm

  • I think svn has an ability to supress empty lines. Need to check again though.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sat Dec 27, 2008 6:09 pm

  • This is a syntactically broken diff file, not a bug/feature in svn. I am sure that pastebin did it.
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Dec 27, 2008 6:34 pm

  • Doesnt matter if svn fixes it or not. That diff that i posted is broken. for some reason i cant get a proper diff with all the file changes
    Icarus
     

Sat Dec 27, 2008 6:37 pm

  • How are you making the diff anyway?
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Dec 27, 2008 11:14 pm

  • by doing svn diff < patch.diff
    Icarus
     

Sun Dec 28, 2008 4:46 pm

  • Code: Select all
    svn diff -u > mypatch.diff
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sun Dec 28, 2008 5:58 pm

  • what does -u do?
    Icarus
     

Sun Dec 28, 2008 7:55 pm

  • Shows -3,+3 lines (by default) above,below the patched place. Makes it easier to identify which places were changed.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Fri Jan 02, 2009 5:11 am

Fri Jan 02, 2009 9:18 am

  • I can not understand all this trouble with patching anyway.

    Invalid patch files and such. Well, first of all I would probably just upload the .patch file, like -z- did it (instead of using pastebins). And when I used to create or apply patches with tortoise svn, I never had problems either.

    That's so weird.
    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

Tue Jan 06, 2009 2:15 am

  • http://pastebin.com/m653717ff

    thats my newest update.
    Green: i dont have a webserver and most file host servers are very spammy so i avoid them.

    EDIT: sorry this patch isnt working.
    Icarus
     

Tue Jan 06, 2009 3:15 am

  • Icarus wrote:http://pastebin.com/m653717ff

    thats my newest update.
    Green: i dont have a webserver and most file host servers are very spammy so i avoid them.

    EDIT: sorry this patch isnt working.


    use omploader, drop.io or filedropper...
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Tue Jan 06, 2009 9:46 am

  • Icarus wrote:Green: i dont have a webserver and most file host servers are very spammy so i avoid them.

    I'll give you a user-account on planetnexuiz.de where you can put your files. I'll talk to you in IRC about it.
    WIll be something like http://esteel.planetnexuiz.de/
    e.g. http://icarus.planetnexuiz.de/ (when it's done)
    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

Sun Jan 18, 2009 1:01 am

Sun Jan 18, 2009 8:47 am

Sun Jan 18, 2009 9:19 am

  • Icarus, if you need some webspace to host your patches hit me up on pm or irc.
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Sun Jan 18, 2009 12:06 pm

  • I guess hosting shouldn't be the problem in this case, because http://paste.debian.net/ allows you to upload the patch file as a file (no copy/paste needed), and also allows me to download it as a file again, so this pastebin is practically a text file hoster already. Plus, I've had no problems with other patches posted here on the board that were hosted on http://paste.debian.net/, they applied just fine.
    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

Sun Jan 18, 2009 3:54 pm

  • I've fixed the patch changing the paths of modified files (from nexuiz directory now) and deleting blank lines.

    http://pastebin.com/f3bd5c2f

    For the next time Dib, again, u should generate the patch from the directory NexuizSVN/nexuiz.
    Those blank lines... why are they in the patch?? Strange. They are present only after ~340 lines... maybe u add them by fault editing the patch in a text editor...
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Mon Feb 09, 2009 1:01 am

Next


Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 0 guests