}
prvm_language = strzone(prvm_language);
cvar_set("_menu_prvm_language", prvm_language);
+ cvar_set("_menu_profile_apply_button_command_executed", "1");
#ifdef WATERMARK
LOG_TRACEF("^4MQC Build information: ^1%s", WATERMARK);
return me;
}
+bool autocvar__menu_profile_apply_button_command_executed;
void XonoticProfileTab_draw(entity me)
{
string name = cvar_string("_cl_name");
me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
else
me.playerNameLabel.alpha = me.playerNameLabelAlpha;
-
- // if values changed from console, update it in menu
- if (me.applyButton.disabled)
+
+ // if this cvar is set then we are sure the apply button command has really taken effect
+ // we can't assume that it gets executed in one frame due to how cmd works
+ if (autocvar__menu_profile_apply_button_command_executed)
{
+ cvar_set("_menu_profile_apply_button_command_executed", "0");
// name field
string inputName = cvar_string(MENU_CVAR_NAME);
if (name != inputName)
"name \"$"MENU_CVAR_NAME"\";"
"playermodel $"MENU_CVAR_MODEL";"
"playerskin $"MENU_CVAR_SKIN";"
+ "_menu_profile_apply_button_command_executed 1;"
, COMMANDBUTTON_APPLY);
me.applyButton.disableOnClick = true;
set _menu_cl_color ""
set _menu_cl_playerskin ""
set _menu_cl_playermodel ""
+set _menu_profile_apply_button_command_executed 0
// effects
r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture