From 8abd30c14f59f2dea55646f44db03a7678938ab5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 24 Sep 2020 00:06:05 +1000 Subject: [PATCH] Reduce verbosity of most logging operations and fix some cvars not being defined in config --- qcsrc/common/playerstats.qc | 6 +++--- qcsrc/common/weapons/all.qh | 2 +- qcsrc/lib/log.qh | 5 +++-- xonotic-client.cfg | 21 +++++++++++++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 0202adb1d..28d6ccf4c 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -458,7 +458,7 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest) // now request the information uri = strcat(uri, "/player/", uri_escape(uri_escape(uri_escape(joiningplayer.crypto_idfp))), "/elo.txt"); - LOG_TRACE("Retrieving playerstats from URL: ", uri); + LOG_DEBUG("Retrieving playerstats from URL: ", uri); url_single_fopen( uri, FILE_APPEND, @@ -593,8 +593,8 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status) gt = data; break; case "e": - LOG_TRACE("G: ", gt); - LOG_TRACE("e: ", data); + //LOG_TRACE("G: ", gt); + //LOG_TRACE("e: ", data); if (gt == PlayerStats_GetGametype()) { handled = true; float e = stof(data); diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index f98152aa8..2a7ed0beb 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -329,7 +329,7 @@ STATIC_INIT(register_weapons_done) else inaccessible = strcat(inaccessible, "\n", it.netname); }); - if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible); + if (inaccessible && autocvar_developer > 0) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible); #ifdef CSQC FOREACH(Weapons, true, it.wr_init(it)); #endif diff --git a/qcsrc/lib/log.qh b/qcsrc/lib/log.qh index 01ce44408..59bb70dd3 100644 --- a/qcsrc/lib/log.qh +++ b/qcsrc/lib/log.qh @@ -51,7 +51,8 @@ string(string, string...) strcat1n = #115; #define _LOG_HEADER(level) "^9[::^7"PROGNAME"^9::"level"^9] ", __SOURCELOC__ #define _LOG(f, level, s) \ MACRO_BEGIN \ - f(strcat1n(_LOG_HEADER(level), "\n^7", s, "\n")); \ + if (autocvar_developer > 0) f(strcat1n(_LOG_HEADER(level), "\n")); \ + f(strcat1n("^7", s, "\n")); \ MACRO_END #define LOG_FATAL(...) _LOG_FATAL(strcat1n(__VA_ARGS__)) @@ -70,7 +71,7 @@ string(string, string...) strcat1n = #115; #define LOG_INFOF(...) _LOG_INFO(sprintf(__VA_ARGS__)) #define _LOG_INFO(s) \ MACRO_BEGIN \ - dprint(_LOG_HEADER("^5INFO")); \ + if (autocvar_developer > 1) dprint(_LOG_HEADER("^5INFO")); \ string __s = s; \ print("\n^7", __s); \ /* TODO: unconditionally add a newline when possible */ \ diff --git a/xonotic-client.cfg b/xonotic-client.cfg index e39a892fb..ac5212408 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -233,6 +233,8 @@ set cl_deathglow_min 0.5 "glow out up to this glow factor" set cl_respawn_ghosts_keepcolors 0 "if enabled respawn ghosts keep body colors" +set _teams_available 0 "internal cvar, value is synced from the server to reflect currently available teams to join" + cl_movement 1 cl_movement_track_canjump 0 cl_stairsmoothspeed 200 @@ -721,6 +723,11 @@ alias _gunalign_13 "cl_gunalign 4" alias _gunalign_14 "cl_gunalign 3" alias _gunalign_update "_gunalign_$v_flipped$menu_cl_gunalign" +set cl_shootfromfixedorigin "" "dummy cvar, value is synced from the server's g_shootfromfixedorigin setting" + +set cl_jumpspeedcap_min "" "dummy cvar, value is synced from the server's sv_jumpspeedcap_min setting" +set cl_jumpspeedcap_max "" "dummy cvar, value is synced from the server's sv_jumpspeedcap_max setting" + set _menu_alpha "" // will be set by menu QC to the current fading of the menu, can be used by CSQC to fade items set _menu_initialized 0 "is 0 on first menu loading, 1 later" @@ -859,13 +866,27 @@ seta cl_items_nofade 0 seta cl_animate_items 1 seta cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)" seta cl_ghost_items_color "-1 -1 -1" "color of ghosted items (colormod format: 0 0 0 leaves the color unchanged, negative values allowed)" +seta cl_ghost_items_vehicle 1 "show ghosted items when inside a vehicle even when the item is available, to indicate that it can't be picked up" seta cl_simple_items 0 "enable simple items (if server allows)" set cl_simpleitems_postfix "_luma" "posfix to add fo model name when simple items are enabled" set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0 (colormod format: 0 0 0 leaves the color unchanged, negative values allowed)" set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0" +seta cl_arcbeam_simple 1 "use a simplified beam for the Arc instead of accurate flexible poly drawing (improves performance and visuals slightly)" +seta cl_arcbeam_teamcolor 1 "color the Arc beam based on the player's colors" + +seta cl_grapplehook_alpha 1 "opacity of the grappling hook chain" + +seta cl_vaporizerbeam_particle 0 "use a legacy particle effect for the vaporizer beam instead of a rendered poly, may not reflect accurate colors" +seta cl_vaporizerbeam_lifetime 0.8 "time it takes for the vaporizer beam to fade completely" +seta cl_vaporizerbeam_colorboost 0.7 "saturation of the vaporizer beam's color based on the player color" + seta cl_showspectators 0 "Show who's spectating you if server has sv_showspectators enabled" +set cl_useenginerefdef 0 + +set cl_rollkillspeed 10 + // Facility for config.cfg use ONLY. // Interpreted in post-config.cfg. seta menu_forced_saved_cvars "" "These cvars will always be saved, despite engine/Xonotic cvar saving status" -- 2.39.2