From: Rudolf Polzer Date: Tue, 4 May 2010 11:06:35 +0000 (+0200) Subject: demo deleting, slightly improved (and now cvarred by cl_autodemo_delete_keeprecords) X-Git-Tag: xonotic-v0.1.0preview~612^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=30f47e14a53a357f2ffa3106a2ab7d6af2d8781b;p=xonotic%2Fxonotic-data.pk3dir.git demo deleting, slightly improved (and now cvarred by cl_autodemo_delete_keeprecords) --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 0c44f8ef8..a48f70157 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/client/sbar.qc b/qcsrc/client/sbar.qc index 304d0a681..d817590d6 100644 --- a/qcsrc/client/sbar.qc +++ b/qcsrc/client/sbar.qc @@ -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) {