Merge branch 'fruitiex/newpanelhud' of ssh://git.xonotic.org/xonotic-data.pk3dir...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / d
1 --- sbar.qc.BASE.4129.qc        2010-05-06 19:58:30.171990860 +0200
2 +++ sbar.qc     2010-05-06 20:01:25.251979343 +0200
3 @@ -3395,8 +3395,15 @@
4                 rr = RACE_RECORD;
5         t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time")));
6  
7 -       if(score && score < t || !t)
8 +       if(score && (score < t || !t)) {
9                 db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score));
10 +               if(cvar("cl_autodemo_delete_keeprecords"))
11 +               {
12 +                       f = cvar("cl_autodemo_delete");
13 +                       f &~= 1;
14 +                       cvar_set("cl_autodemo_delete", ftos(f)); // don't delete demo with new record!
15 +               }
16 +       }
17  
18         if(t != crecordtime_prev) {
19                 crecordtime_prev = t;