// TODO remove this cvar and related menu code in a later Xonotic version
seta _spec_forfeit_bindupdate 0
-seta spec_forfeit_ask 1 "allow asking for forfeit confirmation"
-alias spec_forfeit "spectate \"\" ${spec_forfeit_ask}${_menu_forfeit_dialog_available}"
+seta spec_forfeit_dont_ask 0 "don't ask for forfeit confirmation"
+alias spec_forfeit "spectate \"\" ${spec_forfeit_dont_ask}${_menu_forfeit_dialog_available}"
alias spec "spectate ${* ?}"
e.onClickEntity = me;
me.TR(me);
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "spec_forfeit_ask", _("Never ask again")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "spec_forfeit_dont_ask", _("Never ask again")));
}
return;
}
- bool forfeit_ask = (!warmup_stage && stof(argv(2)));
+ // here we are intentionally checking if argv(2) is exactly 1
+ bool forfeit_ask = (!warmup_stage && stof(argv(2)) == 1);
if (IS_PLAYER(caller) && forfeit_ask)
{
sprint(caller, "\nUsage:^3 cmd spectate [<client>] [<ask_forfeit>]\n");
sprint(caller, " Where <client> can be the player to spectate.\n");
sprint(caller, " If <client> is \"\" or not specified, caller becomes observer.\n");
- sprint(caller, " If <client> is \"\" and forfeit_ask is not 0 caller will be asked"
+ sprint(caller, " If <client> is \"\" and forfeit_ask is 1 caller will be asked"
" to confirm forfeiting the current game.\n");
return;
}