X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fplayerstats.qc;h=46490a1b6d4983704794f02d792b2514c3e8aa47;hb=c414b7f0f3e2297640d07576e5cc258bc22e756b;hp=467c0d862cfd9ee914ab3c09cc8875425f033260;hpb=693928c63672e0a6104560890db19a36f9bd605a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index 467c0d862..46490a1b6 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -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]); } }