From: drjaska Date: Mon, 22 Jul 2024 01:48:59 +0000 (+0300) Subject: Provide an off-switch for cts checkpoint splits X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f812fd6a171685b7b7b4a8b78e9561906cf5af0d;p=xonotic%2Fxonotic-data.pk3dir.git Provide an off-switch for cts checkpoint splits Some users described this feature as "flooding the console", "cl_race_checkpoint_splits_console 0" disables the prints. Their collection is not disabled so that users can still opt-in when they get a good run and want to see the splits. --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 36dbd7e22..0185d06cd 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1209,8 +1209,9 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew) // does this index have a split? if (race_checkpoint_splits[i]) { - // print it and free it - LOG_HELP(race_checkpoint_splits[i]); + // print it if enabled and free it + if (autocvar_cl_race_checkpoint_splits_console) + LOG_HELP(race_checkpoint_splits[i]); strfree(race_checkpoint_splits[i]); } } diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 34c8fc63b..d4d97dc83 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -17,6 +17,14 @@ bool autocvar_hud_showbinds; bool autocvar_hud_showbinds_limit; bool autocvar__hud_showbinds_reload; bool autocvar_developer_csqcentities; +#if 0 +// TODO: change this path after next (0.9) release +// or the release after it to support the old-stable release +// this can't be done now as players would lack these from their configs then +bool autocvar_cl_race_checkpoint_splits_console; +#else +AUTOCVAR_SAVE(cl_race_checkpoint_splits_console, bool, 1, "Print checkpoint splits to console"); +#endif bool autocvar_cl_race_cptimes_onlyself; // TODO: move to race gamemode bool autocvar_cl_race_cptimes_showself = false; bool autocvar_cl_welcome = true; diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 4abe50fa3..2413a646a 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -711,6 +711,7 @@ seta cl_jetpack_jump 1 "Activate jetpack by pressing jump in the air. 0 = Disabl seta cl_race_cptimes_showself 1 "Always show your own times as well as the current best on checkpoints in Race/CTS" seta cl_race_cptimes_onlyself 0 "Only show your own times on checkpoints in Race/CTS. Can be forced on by the server via g_race_cptimes_onlyself" +seta cl_race_checkpoint_splits_console 1 "Print checkpoint splits to console" seta cl_cts_noautoswitch 0 "Prevent forced switching to new weapons in CTS"