Implement sh_announcescinum and sh_allowteamchange

This commit is contained in:
Xylemon 2023-04-26 05:12:07 -07:00
parent bdafdf9db0
commit 6b97b8a6b5

View file

@ -19,13 +19,20 @@ void VGUI_ChooseTeam(void);
int int
ClientGame_ConsoleCommand(void) ClientGame_ConsoleCommand(void)
{ {
switch(argv(0)) { switch(argv(0)) {
case "+sciscore": case "+sciscore":
if (cvar("sh_announcescinum") == 1)
g_sciscore = true; g_sciscore = true;
break; break;
case "-sciscore": case "-sciscore":
if (cvar("sh_announcescinum") == 1)
g_sciscore = false; g_sciscore = false;
break; break;
case "changeteam":
if (cvar("sh_allowteamchange") == 1)
CMD_ChooseTeam();
break;
default: default:
return (0); return (0);
} }
@ -40,9 +47,6 @@ CMD_ChooseTeam(void)
if (serverkeyfloat("teams") > 1) if (serverkeyfloat("teams") > 1)
/* handle both VGUI and text menus */
// if (ClientGame_IsUsingVGUI())
VGUI_ChooseTeam(); VGUI_ChooseTeam();
// else
// Textmenu_Toggle("TEAM_SELECT");
} }