Merge branch 'server-options-expander' into 'master'

Add bot and PWR options to Server Options

Closes #922 and #921

See merge request KartKrew/Kart!2006
This commit is contained in:
Oni 2024-03-04 06:35:41 +00:00
commit 840f5b7998
2 changed files with 21 additions and 10 deletions

View file

@ -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!",

View file

@ -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);