Allow pressing <a> again while a follower is on your Profile (or you have a local party and can't make any profile edits from here) to play horn... with goofy bonus text from the only obvious source

This commit is contained in:
toaster 2025-08-14 23:42:05 +01:00
parent 2e0c8fab33
commit fb2224e9b1
3 changed files with 61 additions and 19 deletions

View file

@ -1467,6 +1467,8 @@ extern struct challengesmenu_s {
UINT8 fade;
UINT8 hornposting;
boolean cache_secondrowlocked;
patch_t *tile_category[10][2];

View file

@ -7303,23 +7303,50 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
y = (BASEVIDHEIGHT-14);
const char *actiontext = NULL;
if (setup_numplayers <= 1 && cv_lastprofile[0].value != PROFILE_GUEST)
{
profile_t *pr = PR_GetProfile(cv_lastprofile[0].value);
if (pr)
if (pr && strcmp(pr->follower, followers[fskin].name))
{
K_DrawGameControl(
4, y, 0,
strcmp(pr->follower, followers[fskin].name)
? "<a> <sky>Set on Profile"
: "<a_pressed> <gray>Set on Profile",
0, TINY_FONT, 0
);
y -= 14;
actiontext = (followers[fskin].hornsound == sfx_melody)
? "<a> <aqua>Set on Profile"
: "<a> <sky>Set on Profile";
}
}
if (!actiontext)
{
if (followers[fskin].hornsound == sfx_melody)
{
actiontext = "<a_animated> <aqua>Play Ancient Melody?";
}
else switch (challengesmenu.hornposting % 4)
{
default:
actiontext = "<a_animated> <sky>Say hello";
break;
case 1:
actiontext = "<a_animated> <sky>Express your feelings";
break;
case 2:
actiontext = "<a_animated> <sky>Celebrate victory";
break;
case 3:
actiontext = "<a_animated> <sky>Announce you are pressing horn";
break;
}
}
K_DrawGameControl(
4, y, 0,
actiontext,
0, TINY_FONT, 0
);
y -= 14;
if (followers[fskin].category < numfollowercategories)
{
V_DrawFixedPatch(4*FRACUNIT, (y - 6)*FRACUNIT,

View file

@ -393,6 +393,7 @@ menu_t *M_InterruptMenuWithChallenges(menu_t *desiredmenu)
challengesmenu.tutorialfound = NEXTMAP_INVALID;
challengesmenu.chaokeyhold = 0;
challengesmenu.unlockcondition = NULL;
challengesmenu.hornposting = 0;
if (firstopen)
{
@ -1251,24 +1252,36 @@ boolean M_ChallengesInputs(INT32 ch)
}
case SECRET_FOLLOWER:
{
if (setup_numplayers <= 1 && cv_lastprofile[0].value != PROFILE_GUEST && M_MenuConfirmPressed(pid))
if (M_MenuConfirmPressed(pid))
{
INT32 fskin = M_UnlockableFollowerNum(ref);
if (fskin != -1)
{
profile_t *pr = PR_GetProfile(cv_lastprofile[0].value);
if (pr && strcmp(pr->follower, followers[fskin].name))
if (setup_numplayers <= 1 && cv_lastprofile[0].value != PROFILE_GUEST)
{
strcpy(pr->follower, followers[fskin].name);
CV_Set(&cv_follower[0], followers[fskin].name);
profile_t *pr = PR_GetProfile(cv_lastprofile[0].value);
S_StartSound(NULL, sfx_s3k63);
S_StartSound(NULL, followers[fskin].hornsound);
M_SetMenuDelay(pid);
if (pr && strcmp(pr->follower, followers[fskin].name))
{
strcpy(pr->follower, followers[fskin].name);
CV_Set(&cv_follower[0], followers[fskin].name);
forceflip = true;
challengesmenu.hornposting = 0;
S_StartSound(NULL, sfx_s3k63);
forceflip = true;
}
}
if (!forceflip)
{
challengesmenu.hornposting++;
}
S_StartSound(NULL, followers[fskin].hornsound);
M_SetMenuDelay(pid);
forceflip = true;
}
}
break;