// TODO remove this cvar and related menu code in a later Xonotic version
seta _spec_forfeit_bindupdate 0
-seta menu_ask_forfeit 1 "ask for forfeit confirmation"
-alias spec_forfeit0 "spectate"
-alias spec_forfeit1 "spectate \"\" ASK_FORFEIT"
-alias spec_forfeit "spec_forfeit${menu_ask_forfeit}"
+seta spec_forfeit_ask 1 "allow asking for forfeit confirmation"
+alias spec_forfeit "spectate \"\" ASK_FORFEIT"
alias spec "spectate ${* ?}"
// TODO: Remove cvar_cl_handicap vector after 0.9 release
#ifdef GAMEQC
+REPLICATE_INIT(bool, cvar_spec_forfeit_ask);
REPLICATE_INIT(bool, cvar__menu_forfeit_dialog_available);
REPLICATE_INIT(bool, cvar_cl_autoswitch);
REPLICATE_INIT(int, cvar_cl_autoscreenshot);
REPLICATE_INIT(float, cvar_cl_handicap_damage_taken);
REPLICATE_INIT(bool, cvar_cl_noantilag);
REPLICATE_INIT(string, cvar_g_xonoticversion);
+REPLICATE(cvar_spec_forfeit_ask, bool, "spec_forfeit_ask");
REPLICATE(cvar__menu_forfeit_dialog_available, bool, "_menu_forfeit_dialog_available");
REPLICATE(cvar_cl_autoswitch, bool, "cl_autoswitch");
REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot");
e.onClickEntity = me;
me.TR(me);
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "menu_ask_forfeit", _("Never ask again")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "spec_forfeit_ask", _("Never ask again")));
}
return;
}
- bool forfeit_now = (warmup_stage || argv(2) != "ASK_FORFEIT");
+ bool forfeit_now =
+ (warmup_stage || !caller.cvar_spec_forfeit_ask || argv(2) != "ASK_FORFEIT");
if (IS_PLAYER(caller) && !forfeit_now && caller.cvar__menu_forfeit_dialog_available)
{