From 2f6d7230f0b8f828d64a09cd315bd13e710900a5 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 15 Aug 2025 22:44:53 +0100 Subject: [PATCH] Dumb post alert: Ease off the horn If we're bringing the spice we have to bring the whole pepper --- src/d_netcmd.c | 9 ++++++- src/k_follower.c | 2 ++ src/k_follower.h | 2 ++ src/k_menu.h | 2 ++ src/k_menudraw.c | 46 ++++++++++++++++++++++++++++++++--- src/menus/extras-challenges.c | 14 ++++++++--- src/menus/play-char-select.c | 19 ++++++++++----- src/p_setup.cpp | 2 +- 8 files changed, 81 insertions(+), 15 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 683487c97..b089ac13b 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1048,7 +1048,14 @@ static void SendNameAndColor(const UINT8 n) WRITESTRINGN(p, cv_playername[n].zstring, MAXPLAYERNAME); WRITEUINT16(p, sendColor); WRITEUINT8(p, (UINT8)cv_skin[n].value); - WRITEINT16(p, (INT16)cv_follower[n].value); + if (horngoner) + { + WRITEINT16(p, (-1)); + } + else + { + WRITEINT16(p, (INT16)cv_follower[n].value); + } //CONS_Printf("Sending follower id %d\n", (INT16)cv_follower[n].value); WRITEUINT16(p, sendFollowerColor); diff --git a/src/k_follower.c b/src/k_follower.c index d80835f61..847a95c50 100644 --- a/src/k_follower.c +++ b/src/k_follower.c @@ -32,6 +32,8 @@ follower_t followers[MAXFOLLOWERS]; INT32 numfollowercategories; followercategory_t followercategories[MAXFOLLOWERCATEGORIES]; +boolean horngoner = false; + CV_PossibleValue_t Followercolor_cons_t[MAXSKINCOLORS+3]; // +3 to account for "Match", "Opposite" & NULL /*-------------------------------------------------- diff --git a/src/k_follower.h b/src/k_follower.h index dc5ca9a72..78dbc9b0e 100644 --- a/src/k_follower.h +++ b/src/k_follower.h @@ -115,6 +115,8 @@ struct followercategory_t extern INT32 numfollowercategories; extern followercategory_t followercategories[MAXFOLLOWERCATEGORIES]; +extern boolean horngoner; + /*-------------------------------------------------- INT32 K_FollowerAvailable(const char *name) diff --git a/src/k_menu.h b/src/k_menu.h index 1fd0e93bf..bc69c2299 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -1428,6 +1428,8 @@ typedef enum #define CHAOHOLD_END (3) #define CHAOHOLD_PADDING (CHAOHOLD_BEGIN + CHAOHOLD_END) +#define EASEOFFHORN 50 + extern struct timeattackmenu_s { tic_t ticker; // How long the menu's been open for diff --git a/src/k_menudraw.c b/src/k_menudraw.c index cf33e21f5..09bc1e8b4 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -1862,6 +1862,9 @@ static boolean M_DrawFollowerSprite(INT16 x, INT16 y, INT32 num, boolean charfli follower_t *fl; UINT8 rotation = (charflip ? 1 : 7); + if (horngoner) + return false; + if (p != NULL) followernum = p->followern; else @@ -2406,7 +2409,7 @@ void M_DrawProfileCard(INT32 x, INT32 y, boolean greyedout, profile_t *p) V_DrawMappedPatch(x+14, y+66, 0, faceprefix[skinnum][FACE_RANK], ccolormap); } - if (fln >= 0) + if (!horngoner && fln >= 0) { UINT16 fcol = K_GetEffectiveFollowerColor( p->followercolor, @@ -6827,8 +6830,15 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, UINT8 *flash iconid = 1; break; case SECRET_FOLLOWER: - bcol = SKINCOLOR_SAPPHIRE; - iconid = 2; + if (horngoner) + { + bcol = SKINCOLOR_BLACK; + } + else + { + bcol = SKINCOLOR_SAPPHIRE; + iconid = 2; + } break; case SECRET_COLOR: //bcol = SKINCOLOR_SILVER; @@ -6890,7 +6900,9 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, UINT8 *flash } #endif - if (categoryside) + if (horngoner && ref->type == SECRET_FOLLOWER) + goto drawborder; + else if (categoryside) { colormap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_SILVER, GTC_MENUCACHE); @@ -7305,6 +7317,11 @@ static const char* M_DrawChallengePreview(INT32 x, INT32 y) colormap = R_GetTranslationColormap(TC_BLINK, SKINCOLOR_BLACK, GTC_MENUCACHE); M_DrawCharacterSprite(x, y, skin, SPR2_STIN, 7, 0, 0, colormap); + if (horngoner) + { + return " MISSING."; + } + // Draw follower next to them if (fskin != -1) { @@ -7332,6 +7349,27 @@ static const char* M_DrawChallengePreview(INT32 x, INT32 y) { actiontext = " Play Ancient Melody?"; } + else if (challengesmenu.hornposting >= EASEOFFHORN) + actiontext = " Time to die"; + else if (challengesmenu.hornposting >= (EASEOFFHORN-5)) + { + if (challengesmenu.hornposting == EASEOFFHORN) + actiontext = "Time to die"; + else + actiontext = "I asked politely"; + actiontext = va("%s%s", + (M_MenuConfirmPressed(0) + ? " " + : " " + ), actiontext + ); + } + else if (challengesmenu.hornposting >= (EASEOFFHORN-10)) + { + actiontext = M_MenuConfirmPressed(0) + ? " Ease off the horn" + : " Ease off the horn"; + } else switch (challengesmenu.hornposting % 4) { default: diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index 60cbc9944..a732e3e3e 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -1252,7 +1252,7 @@ boolean M_ChallengesInputs(INT32 ch) } case SECRET_FOLLOWER: { - if (M_MenuConfirmPressed(pid)) + if (!horngoner && M_MenuConfirmPressed(pid)) { INT32 fskin = M_UnlockableFollowerNum(ref); if (fskin != -1) @@ -1274,11 +1274,19 @@ boolean M_ChallengesInputs(INT32 ch) } if (!forceflip) - { challengesmenu.hornposting++; + + if (challengesmenu.hornposting > EASEOFFHORN) + { + challengesmenu.hornposting = 0; + horngoner = true; + S_StartSound(NULL, sfx_s3k72); + } + else + { + S_StartSound(NULL, followers[fskin].hornsound); } - S_StartSound(NULL, followers[fskin].hornsound); M_SetMenuDelay(pid); forceflip = true; diff --git a/src/menus/play-char-select.c b/src/menus/play-char-select.c index 9a1e32692..1a055a7b5 100644 --- a/src/menus/play-char-select.c +++ b/src/menus/play-char-select.c @@ -777,7 +777,7 @@ static boolean M_HandleBeginningColors(setup_player_t *p) static void M_HandleBeginningFollowers(setup_player_t *p) { - if (setup_numfollowercategories == 0) + if (horngoner || setup_numfollowercategories == 0) { p->followern = -1; M_HandlePlayerFinalise(p); @@ -1392,7 +1392,9 @@ static void M_MPConfirmCharacterSelection(void) CV_StealthSetValue(&cv_playercolor[i], col); // follower - if (setup_player[i].followern < 0) + if (horngoner) + ; + else if (setup_player[i].followern < 0) CV_StealthSet(&cv_follower[i], "None"); else CV_StealthSet(&cv_follower[i], followers[setup_player[i].followern].name); @@ -1457,9 +1459,12 @@ void M_CharacterSelectTick(void) strcpy(optionsmenu.profile->skinname, skins[setup_player[0].skin]->name); optionsmenu.profile->color = setup_player[0].color; - // save follower - strcpy(optionsmenu.profile->follower, followers[setup_player[0].followern].name); - optionsmenu.profile->followercolor = setup_player[0].followercolor; + if (!horngoner) // so you don't lose your choice after annoying the game + { + // save follower + strcpy(optionsmenu.profile->follower, followers[setup_player[0].followern].name); + optionsmenu.profile->followercolor = setup_player[0].followercolor; + } // reset setup_player memset(setup_player, 0, sizeof(setup_player)); @@ -1475,7 +1480,9 @@ void M_CharacterSelectTick(void) CV_StealthSet(&cv_skin[i], skins[setup_player[i].skin]->name); CV_StealthSetValue(&cv_playercolor[i], setup_player[i].color); - if (setup_player[i].followern < 0) + if (horngoner) + ; + else if (setup_player[i].followern < 0) CV_StealthSet(&cv_follower[i], "None"); else CV_StealthSet(&cv_follower[i], followers[setup_player[i].followern].name); diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 690002841..7254f38a7 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -8099,7 +8099,7 @@ static void P_InitPlayers(void) skin = 0; } - if (netgame) + if (netgame || horngoner) ; // shouldn't happen but at least attempt to sync if it does else for (i = 0; i < numfollowers; i++) {