]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
demo deleting, slightly improved (and now cvarred by cl_autodemo_delete_keeprecords)
authorRudolf Polzer <divverent@alientrap.org>
Tue, 4 May 2010 11:06:35 +0000 (13:06 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 4 May 2010 11:09:12 +0000 (13:09 +0200)
defaultXonotic.cfg
qcsrc/client/sbar.qc

index 0c44f8ef8a6a69c20a5ae2417fd8feac03305697..a48f7015726a3722aa5ddf642acaaa8016cb3f10 100644 (file)
@@ -1798,3 +1798,6 @@ mod_q1bsp_polygoncollisions 1
 // improve some minor details
 sv_gameplayfix_gravityunaffectedbyticrate 1
 sv_gameplayfix_nogravityonground 1
+
+// autodemo deleting
+seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos"
index 304d0a681b0fd025e9f6b577f00d435ffee06f54..d817590d6941e029b6c506479415dc19d083a74f 100644 (file)
@@ -3397,8 +3397,12 @@ void CSQC_race_hud(void)
 
        if(score && (score < t || !t)) {
                db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score));
-               if(cvar("cl_autodemo_delete"))
-                       cvar_set("cl_autodemo_delete", "3"); // don't delete demo with new record!
+               if(cvar("cl_autodemo_delete_keeprecords"))
+               {
+                       f = cvar("cl_autodemo_delete");
+                       f &~= 1;
+                       cvar_set("cl_autodemo_delete", ftos(f)); // don't delete demo with new record!
+               }
        }
 
        if(t != crecordtime_prev) {