From ed243910be23f14b194ac47e916a7993b5b2fd94 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sun, 31 Mar 2024 18:28:32 -0700 Subject: [PATCH] Add "gamestochat" cvar to Server Options --- src/cvars.cpp | 2 +- src/menus/options-server-1.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cvars.cpp b/src/cvars.cpp index 4519bfe8e..f55dcd02b 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -1331,7 +1331,7 @@ consvar_t cv_chatwidth = Player("chatwidth", "150").min_max(64, 150); // old shit console chat. (mostly exists for stuff like terminal, not because I cared if anyone liked the old chat.) consvar_t cv_consolechat = Player("chatmode", "Yes").values({{0, "Yes"}, {2, "No"}}); -consvar_t cv_gamestochat = Player("gamestochat", "0").values(CV_Unsigned); +consvar_t cv_gamestochat = Player("gamestochat", "0").min_max(0, 99); void Mute_OnChange(void); consvar_t cv_mute = UnsavedNetVar("mute", "Off").on_off().onchange(Mute_OnChange); diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index 288fa3a47..2ed23cc20 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -71,6 +71,9 @@ menuitem_t OPTIONS_Server[] = {IT_STRING | IT_CVAR, "Pause Permissions", "Who is allowed to pause the game?", NULL, {.cvar = &cv_pause}, 0, 0}, + {IT_STRING | IT_CVAR, "Rounds Needed To Chat", "How many rounds players must complete before they can chat. Good vs. ban evaders.", + NULL, {.cvar = &cv_gamestochat}, 0, 0}, + {IT_HEADER, "Chat...", NULL, NULL, {NULL}, 0, 0},