From ed9adfae684e1162b3e5182d471e985d5a0eec80 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 12 Jan 2025 02:00:31 +0100 Subject: [PATCH] add toggle to colour sneakertrail flames (thx neppy!) --- src/k_kart.c | 14 +++++++++++++- src/k_kart.h | 2 +- src/m_menu.c | 17 ++++++++++------- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 896b98b30..f4835b288 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -75,9 +75,12 @@ IMPL_HUD_OFFSET(stat); // Stats #undef IMPL_HUD_OFFSET_X #undef IMPL_HUD_OFFSET_Y +// extra colourisation stuff static CV_PossibleValue_t colorspeedlines_cons_t[] = {{0, "Off"}, {1, "Normal"}, {2, "+Driftcharge"}, {0, NULL}}; consvar_t cv_coloredspeedlines = {"colorizedspeedlines", "Off", CV_SAVE, colorspeedlines_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_coloredsneakertrail = {"sneakertrailcolor", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; + //extra hud things consvar_t cv_showstats = {"showstats", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_showinput = {"showinput", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -770,7 +773,10 @@ void K_RegisterKartStuff(void) #undef REG_HUD_OFFSET_X #undef REG_HUD_OFFSET_Y + // Colored speedlines CV_RegisterVar(&cv_coloredspeedlines); + // Colored trails + CV_RegisterVar(&cv_coloredsneakertrail); CV_RegisterVar(&cv_showstats); CV_RegisterVar(&cv_showinput); @@ -828,7 +834,6 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_lessflicker); CV_RegisterVar(&cv_mouseturn); - } //} @@ -3491,6 +3496,13 @@ void K_SpawnBoostTrail(player_t *player) flame->angle = travelangle; flame->fuse = TICRATE*2; flame->destscale = player->mo->scale; + + if (cv_coloredsneakertrail.value) + { + flame->colorized = true; + flame->color = player->skincolor; + } + P_SetScale(flame, player->mo->scale); // not K_MatchGenericExtraFlags so that a stolen sneaker can be seen K_FlipFromObject(flame, player->mo); diff --git a/src/k_kart.h b/src/k_kart.h index ac860ab7e..5f0127132 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -22,7 +22,7 @@ boolean K_UseColorHud(void); void K_RegisterKartStuff(void); -extern consvar_t cv_coloredspeedlines; +extern consvar_t cv_coloredspeedlines, cv_coloredsneakertrail; extern consvar_t cv_colorizedhud, cv_colorizeditembox, cv_colorizedhudcolor; extern consvar_t cv_darkitembox; extern consvar_t cv_biglaps; diff --git a/src/m_menu.c b/src/m_menu.c index d8e152209..fbe7e0ffb 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2181,17 +2181,18 @@ static menuitem_t OP_SaturnMenu[] = {IT_STRING | IT_CVAR, NULL, "Skin Select Spinning Speed", &cv_skinselectspin, 20}, {IT_STRING | IT_CVAR, NULL, "Colourized Speedlines", &cv_coloredspeedlines, 30}, + {IT_STRING | IT_CVAR, NULL, "Colourized Sneakertrails", &cv_coloredsneakertrail, 35}, - {IT_STRING | IT_CVAR, NULL, "Show Localskin Menus", &cv_showlocalskinmenus, 40}, - {IT_STRING | IT_CVAR, NULL, "Uppercase Menu", &cv_menucaps, 45}, + {IT_STRING | IT_CVAR, NULL, "Show Localskin Menus", &cv_showlocalskinmenus, 45}, + {IT_STRING | IT_CVAR, NULL, "Uppercase Menu", &cv_menucaps, 55}, - {IT_STRING | IT_CVAR, NULL, "Keyboard Layout", &cv_keyboardlayout, 55}, + {IT_STRING | IT_CVAR, NULL, "Keyboard Layout", &cv_keyboardlayout, 60}, - {IT_STRING | IT_CVAR, NULL, "Less Midnight Channel Flicker", &cv_lessflicker, 65}, + {IT_STRING | IT_CVAR, NULL, "Less Midnight Channel Flicker", &cv_lessflicker, 70}, - {IT_SUBMENU|IT_STRING, NULL, "Saturn Hud...", &OP_SaturnHudDef, 75}, - {IT_SUBMENU|IT_STRING, NULL, "Sprite Distortion...", &OP_PlayerDistortDef, 80}, - {IT_SUBMENU|IT_STRING, NULL, "Saturn Credits", &OP_SaturnCreditsDef, 90}, // uwu + {IT_SUBMENU|IT_STRING, NULL, "Saturn Hud...", &OP_SaturnHudDef, 80}, + {IT_SUBMENU|IT_STRING, NULL, "Sprite Distortion...", &OP_PlayerDistortDef, 85}, + {IT_SUBMENU|IT_STRING, NULL, "Saturn Credits", &OP_SaturnCreditsDef, 95}, // uwu }; static const char* OP_SaturnTooltips[] = @@ -2200,6 +2201,7 @@ static const char* OP_SaturnTooltips[] = "How long can the game wait before it kicks you out from the server\nconnecting screen.", "How much speen do you want?", "Colourize the speedlines in your skincolor if you go fast enough!", + "Colourize the sneaker flame trails in your skincolor!", "Show Localskin Menus.", "Force menu to only use uppercase.", "Use your desired Keyboard Layout for Text Input\nthis is either the Default, Native or Azerty\nNative does not affect Gameplay only Text!", @@ -2215,6 +2217,7 @@ enum sm_waittime, sm_skinselspeed, sm_colorlines, + sm_colorflames, sm_showlocalskin, op_uppercase_menu, sm_nativkey,