From: ColdSpirit Date: Mon, 27 Dec 2021 13:13:24 +0000 (+0400) Subject: Removed profile menu cvars initialization X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f49cab015afd00629c387f5734ca6a89a3f874c;p=xonotic%2Fxonotic-data.pk3dir.git Removed profile menu cvars initialization --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index 8f30c8937..e885ee0b0 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -23,25 +23,13 @@ entity makeXonoticProfileTab() me = NEW(XonoticProfileTab); me.configureDialog(me); - // profile menu specific cvars - string name = cvar_string("_cl_name"); - registercvar(MENU_CVAR_NAME, name, 0); - - string color = cvar_string("_cl_color"); - // if color unset, set random color - if(color == cvar_defstring("_cl_color")) + // if color unset, set random color (init it) + if (cvar_string("_cl_color") == cvar_defstring("_cl_color")) { // idk what meaning of 16, maybe just COLOR_BUTTONS_COUNT+1 float randomColor = 16 * floor(random() * COLOR_BUTTONS_COUNT) + floor(random() * COLOR_BUTTONS_COUNT); cvar_set("_cl_color", ftos(randomColor)); } - registercvar(MENU_CVAR_COLOR, color, 0); - - string skin = cvar_string("_cl_playerskin"); - registercvar(MENU_CVAR_SKIN, skin, 0); - - string model = cvar_string("_cl_playermodel"); - registercvar(MENU_CVAR_MODEL, model, 0); return me; } diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 8ade6794e..c5af7159d 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -282,6 +282,12 @@ seta menu_monsters_edit_spawn "" seta menu_monsters_edit_skin 0 seta menu_monsters_edit_movetarget 1 +// profile menu +set _menu_cl_name "" +set _menu_cl_color "" +set _menu_cl_playerskin "" +set _menu_cl_playermodel "" + // effects r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture mod_q3shader_force_terrain_alphaflag 1 // supposedly now required for r_glsl_vertextextureblend_usebothalphas to work