From 6987e6516dfbd9a89ccf6efc8d8fff425d2102b0 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sun, 3 Mar 2024 21:23:32 -0700 Subject: [PATCH 1/2] Add bot and PWR options to Server Options --- src/menus/options-server-1.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index bbd9a20e3..1a83b6af1 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -19,6 +19,22 @@ menuitem_t OPTIONS_Server[] = NULL, {.cvar = &cv_advertise}, 0, 0}, + {IT_HEADER, "Players...", NULL, + NULL, {NULL}, 0, 0}, + + {IT_STRING | IT_CVAR, "Maximum Players", "How many players can play at once.", + NULL, {.cvar = &cv_maxplayers}, 0, 0}, + + {IT_STRING | IT_CVAR, "Maximum Connections", "How many players & spectators can connect to the server.", + NULL, {.cvar = &cv_maxconnections}, 0, 0}, + + {IT_STRING | IT_CVAR, "CPU Difficulty", "Bots can fill unused slots. How strong should they be?", + NULL, {.cvar = &cv_kartbot}, 0, 0}, + + {IT_STRING | IT_CVAR, "Use PWR.LV", "Set whether players should be rated on their performance.", + NULL, {.cvar = &cv_kartusepwrlv}, 0, 0}, + + {IT_HEADER, "Progression...", NULL, NULL, {NULL}, 0, 0}, @@ -32,15 +48,9 @@ menuitem_t OPTIONS_Server[] = NULL, {.cvar = &cv_votetime}, 0, 0}, - {IT_HEADER, "Joining...", NULL, + {IT_HEADER, "Permissions...", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "Maximum Players", "How many players can play at once.", - NULL, {.cvar = &cv_maxplayers}, 0, 0}, - - {IT_STRING | IT_CVAR, "Maximum Connections", "How many players & spectators can connect to the server.", - NULL, {.cvar = &cv_maxconnections}, 0, 0}, - {IT_STRING | IT_CVAR, "Allow Joining", "Sets whether players can connect to your server.", NULL, {.cvar = &cv_allownewplayer}, 0, 0}, @@ -60,8 +70,7 @@ menuitem_t OPTIONS_Server[] = {IT_STRING | IT_CVAR, "Chat Spam Protection", "Prevents too many message from a single player.", NULL, {.cvar = &cv_chatspamprotection}, 0, 0}, - - {IT_SPACE | IT_DYBIGSPACE, NULL, NULL, + {IT_HEADER, "Advanced...", NULL, NULL, {NULL}, 0, 0}, {IT_STRING | IT_SUBMENU, "Advanced...", "Advanced options. Be careful when messing with these!", From 0dec816ec9730a6513779057cbd080eb0bc08246 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sun, 3 Mar 2024 22:24:33 -0700 Subject: [PATCH 2/2] Don't use matchbots dummy cvar when starting netgames --- src/menus/transient/level-select.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/menus/transient/level-select.c b/src/menus/transient/level-select.c index 46fb70342..9c8ab635b 100644 --- a/src/menus/transient/level-select.c +++ b/src/menus/transient/level-select.c @@ -747,7 +747,9 @@ void M_LevelSelected(INT16 add, boolean menuupdate) SV_StartSinglePlayerServer(levellist.newgametype, levellist.netgame); - CV_StealthSet(&cv_kartbot, cv_dummymatchbots.string); + if (!levellist.netgame) + CV_StealthSet(&cv_kartbot, cv_dummymatchbots.string); + CV_StealthSet(&cv_kartencore, (cv_dummygpencore.value == 1) ? "On" : "Auto"); CV_StealthSet(&cv_kartspeed, (cv_dummykartspeed.value == KARTSPEED_NORMAL) ? "Auto" : cv_dummykartspeed.string);