From 260b631cd96a530e618cbd11d83f26213b42cb74 Mon Sep 17 00:00:00 2001 From: NeonKnightOA Date: Wed, 20 Mar 2024 12:16:41 -0300 Subject: [PATCH] CUI: Weapon Arena Weapon will be inactive if the Weapon Ruleset isn't Weapon Arena. (#240) --- CHANGELOG.md | 2 +- code/q3_ui/ui_startserver.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index feed7267..2ee0c617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ * `elimination_selfdamage` can now be set in the UI for Elimination and eCTF matches. * `g_grapple` can now be set for all match types. * `g_harvesterFromBodies` can now be set for Harvester matches. - * `g_weaponArenaWeapon` can be selectable in Classic UI, but it needs "Single Weapon Arena" to be set before. + * `g_weaponArenaWeapon` can be selectable in Classic UI, but it needs "Single Weapon Arena" to be set before (it's grayed out if this isn't the case). * `cg_muzzleFlashStyle` can now be chosen in Classic UI under "Game Options". * Separated "Allow Downloads From Servers" and "Allow Downloads To Clients". The former is a player option (`cl_allowDownload 0/1`) and can be set in "Options -> Network" (formerly in "Game Options"), while the latter a server option (`sv_allowDownload 0/1`) and can be set from "Create Server". The option names were changed to reflect these changes. * "Delag Hitscan" was moved from "Game Options" to "Network". diff --git a/code/q3_ui/ui_startserver.c b/code/q3_ui/ui_startserver.c index ba155a93..824f46ba 100644 --- a/code/q3_ui/ui_startserver.c +++ b/code/q3_ui/ui_startserver.c @@ -2049,7 +2049,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) { else /* if(UI_GametypeUsesCaptureLimit(s_serveroptions.gametype)) */ { s_serveroptions.capturelimit.generic.type = MTYPE_FIELD; if (UI_IsARoundBasedGametype(s_serveroptions.gametype)) { - s_serveroptions.capturelimit.generic.name = "Round Limit:"; + s_serveroptions.capturelimit.generic.name = "Score Limit:"; } else { s_serveroptions.capturelimit.generic.name = "Capture Limit:"; @@ -2103,17 +2103,21 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) { } s_serveroptions.weaponMode.generic.name = "Weapons Ruleset:"; s_serveroptions.weaponMode.generic.statusbar = ServerOptions_StatusBar_WeaponMode; - + //Weapon Arena Weapon list y += BIGCHAR_HEIGHT+2; s_serveroptions.weaponArenaWeapon.generic.type = MTYPE_SPINCONTROL; s_serveroptions.weaponArenaWeapon.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; - s_serveroptions.weaponArenaWeapon.generic.name = "SWA Mode Weapon:"; + s_serveroptions.weaponArenaWeapon.generic.name = "Weapon Arena Weapon:"; s_serveroptions.weaponArenaWeapon.generic.x = OPTIONS_X; s_serveroptions.weaponArenaWeapon.generic.y = y; s_serveroptions.weaponArenaWeapon.itemnames = weaponArenaWeapon_list; s_serveroptions.weaponArenaWeapon.generic.statusbar = ServerOptions_StatusBar_WeaponArenaWeapon; + if(s_serveroptions.weaponMode.curvalue != 2) { + s_serveroptions.weaponArenaWeapon.generic.flags |= QMF_INACTIVE; + } + y += BIGCHAR_HEIGHT+2; s_serveroptions.grapple.generic.type = MTYPE_RADIOBUTTON; s_serveroptions.grapple.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;