From b30352022bec9753a82ae030e827691dc08fce53 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 23 Apr 2023 22:05:53 +0100 Subject: [PATCH] M_HandleCharRotate: If the listLen is 1, there's only one valid colour - pick that! Also uses the same technology to skip over setting followers if there are no followers unlocked. --- src/menus/play-char-select.c | 42 +++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/src/menus/play-char-select.c b/src/menus/play-char-select.c index b658d8c31..631fb9d4d 100644 --- a/src/menus/play-char-select.c +++ b/src/menus/play-char-select.c @@ -828,8 +828,29 @@ static void M_HandleCharRotate(setup_player_t *p, UINT8 num) { p->mdepth = CSSTEP_COLORS; M_NewPlayerColors(p); - S_StartSound(NULL, sfx_s3k63); - M_SetMenuDelay(num); + if (p->colors.listLen == 1) + { + p->color = p->colors.list[0]; + if (setup_numfollowercategories == 0) + { + p->followern = -1; + p->mdepth = CSSTEP_READY; + p->delay = TICRATE; + M_SetupReadyExplosions(true, p->gridx, p->gridy, p->color); + S_StartSound(NULL, sfx_s3k4e); + } + else + { + p->mdepth = CSSTEP_FOLLOWERCATEGORY; + S_StartSound(NULL, sfx_s3k63); + M_SetMenuDelay(num); + } + } + else + { + S_StartSound(NULL, sfx_s3k63); + M_SetMenuDelay(num); + } } else if (M_MenuBackPressed(num)) { @@ -871,9 +892,20 @@ static void M_HandleColorRotate(setup_player_t *p, UINT8 num) if (M_MenuConfirmPressed(num) /*|| M_MenuButtonPressed(num, MBT_START)*/) { - p->mdepth = CSSTEP_FOLLOWERCATEGORY; - S_StartSound(NULL, sfx_s3k63); - M_SetMenuDelay(num); + if (setup_numfollowercategories == 0) + { + p->followern = -1; + p->mdepth = CSSTEP_READY; + p->delay = TICRATE; + M_SetupReadyExplosions(true, p->gridx, p->gridy, p->color); + S_StartSound(NULL, sfx_s3k4e); + } + else + { + p->mdepth = CSSTEP_FOLLOWERCATEGORY; + S_StartSound(NULL, sfx_s3k63); + M_SetMenuDelay(num); + } } else if (M_MenuBackPressed(num)) {