]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't include stats with value 0
authorRudolf Polzer <divverent@alientrap.org>
Sat, 15 Jan 2011 11:31:32 +0000 (12:31 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 15 Jan 2011 11:31:32 +0000 (12:31 +0100)
qcsrc/server/playerstats.qc

index 0466a559b513079603898b14d98066fcf0dc4ca7..6b04eea9d6a06e648420feb83de200e4316fd529 100644 (file)
@@ -144,7 +144,8 @@ void PlayerStats_Shutdown()
                        {
                                float v;
                                v = stof(db_get(playerstats_db, sprintf("%s:%s", p, e)));
-                               bufstr_set(b, i++, sprintf("e %s %g", e, v));
+                               if(v != 0)
+                                       bufstr_set(b, i++, sprintf("e %s %g", e, v));
                        }
                }
                bufstr_set(b, i++, "");
@@ -188,7 +189,8 @@ void PlayerStats_AddGlobalInfo(entity p)
        if(p.cvar_cl_allow_uid2name == 1 || clienttype(p) == CLIENTTYPE_BOT)
                db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), p.netname);
 
-       PlayerStats_Event(p, PLAYERSTATS_JOINS, 1);
+       if(p.alivetime > 0)
+               PlayerStats_Event(p, PLAYERSTATS_JOINS, 1);
 
        strunzone(p.playerstats_id);
        p.playerstats_id = string_null;