From dd8ac9f75ce33eea5e66301d26fb0d3dbf4fc36e 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 92021690b..98cec1dc2 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -117,9 +117,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}; @@ -816,7 +819,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); @@ -874,7 +880,6 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_lessflicker); CV_RegisterVar(&cv_mouseturn); - } //} @@ -3554,6 +3559,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 b5e901713..22c67839a 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -24,7 +24,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 9fa7b1945..91855b737 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2232,17 +2232,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[] = @@ -2251,6 +2252,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!", @@ -2266,6 +2268,7 @@ enum sm_waittime, sm_skinselspeed, sm_colorlines, + sm_colorflames, sm_showlocalskin, op_uppercase_menu, sm_nativkey,