]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/playerstats.qc
Add checks for other.deadflag when announcing airshot -- this way airshots don't...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / playerstats.qc
index 467c0d862cfd9ee914ab3c09cc8875425f033260..46490a1b6d4983704794f02d792b2514c3e8aa47 100644 (file)
@@ -57,6 +57,8 @@ void PlayerStats_AddPlayer(entity e)
 {
        if(playerstats_db < 0)
                return;
+       if(e.playerstats_id)
+               return;
 
        if(e.crypto_idfp != "" && e.cvar_cl_allow_uidtracking == 1)
                e.playerstats_id = strzone(e.crypto_idfp);
@@ -175,7 +177,7 @@ void PlayerStats_Sent_URI_Get_Callback(float id, float status, string data)
        S: "hostname" of the server
        C: number of "unpure" cvar changes
     W: winning team ID
-       P: player ID of an existing player; this also sets the owner for all following "n" and "e" lines (lower case!)
+       P: player ID of an existing player; this also sets the owner for all following "n", "e" and "t" lines (lower case!)
        n: nickname of the player (optional)
     t: team ID
        e: followed by an event name, a space, and the event count/score
@@ -306,13 +308,13 @@ void PlayerStats_Accuracy(entity p)
     {
         w = get_weaponinfo(i);
 
-        PlayerStats_Event(p, strcat("acc-", w.netname, "-hit"), a.accuracy_hit[i]);
-        PlayerStats_Event(p, strcat("acc-", w.netname, "-fired"), a.accuracy_fired[i]);
+        PlayerStats_Event(p, strcat("acc-", w.netname, "-hit"), a.accuracy_hit[i-1]);
+        PlayerStats_Event(p, strcat("acc-", w.netname, "-fired"), a.accuracy_fired[i-1]);
 
-        PlayerStats_Event(p, strcat("acc-", w.netname, "-cnt-hit"), a.accuracy_cnt_hit[i]);
-        PlayerStats_Event(p, strcat("acc-", w.netname, "-cnt-fired"), a.accuracy_cnt_fired[i]);
+        PlayerStats_Event(p, strcat("acc-", w.netname, "-cnt-hit"), a.accuracy_cnt_hit[i-1]);
+        PlayerStats_Event(p, strcat("acc-", w.netname, "-cnt-fired"), a.accuracy_cnt_fired[i-1]);
 
-        PlayerStats_Event(p, strcat("acc-", w.netname, "-frags"), a.accuracy_frags[i]);
+        PlayerStats_Event(p, strcat("acc-", w.netname, "-frags"), a.accuracy_frags[i-1]);
     }
 }