changes to some saturn specific visual effects

most of those were added cause they´re cool to look at, but without much thought about potentially giving players that enable such features an "unfair" advantage over others.
- eggboxes wont be rotated while stationary and on the ground anymore (they are meant to deceive players, being rotated makes them stand out alot!)
- players that are about to explode due to eggboxes wont spawn extra red speedlines anymore
- option to show driftlevel per speedlines has been removed
This commit is contained in:
alufolie91 committed 2026-07-05 21:35:52 +02:00
1 parent aa4ec45829
commit 92d07dd680
2 files changed
+24 -62

No files matched your search

+17 -61
View File
@@ -77,7 +77,7 @@ static inline angle_t K_MomentumAngle(const mobj_t *mo, const fixed_t threshold)
}
// extra colourisation stuff
static CV_PossibleValue_t colorspeedlines_cons_t[] = {{0, "Off"}, {1, "Normal"}, {2, "+Driftcharge"}, {3, "Drift only"}, {0, NULL}};
static CV_PossibleValue_t colorspeedlines_cons_t[] = {{0, "Off"}, {1, "On"}, {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};
@@ -3572,13 +3572,14 @@ static INT32 K_StairJankFlip(INT32 value)
// if not cv_bananthrowroll option "+Onground"
static void K_ResetBananaRollangle(mobj_t* mo)
{
if (cv_bananthrowroll.value != 1)
return;
if (!mo->rollangle)
return;
if (mo->type != MT_BANANA && mo->type != MT_EGGMANITEM)
if (mo->type != MT_BANANA && mo->type != MT_EGGMANITEM) // always reset eggboxes
return;
// keep banans "rotated" if we want them to
if (mo->type == MT_BANANA && cv_bananthrowroll.value == 2)
return;
// only reset if on ground
@@ -5567,59 +5568,15 @@ boolean K_PlayerEffectsShouldBlend(player_t *player)
return false;
}
static UINT8 K_GetSpeedLineColor(player_t *player, boolean colorSpeed)
FUNCINLINE static ATTRINLINE void K_SpawnNormalSpeedLines(player_t *player)
{
UINT8 speedcolor = SKINCOLOR_NONE;
const UINT8 playercolor = player->mo->color;
if (colorSpeed)
{
if (cv_coloredspeedlines.value != 3)
speedcolor = playercolor;
if (cv_coloredspeedlines.value >= 2 && player->kartstuff[k_driftboost])
{
if (player->kartstuff[k_driftboost] <= 20)
speedcolor = SKINCOLOR_SAPPHIRE;
else if (player->kartstuff[k_driftboost] <= 50)
speedcolor = SKINCOLOR_RASPBERRY;
else if (player->kartstuff[k_driftboost] <= 125)
speedcolor = K_RainbowColor();
if (cv_coloredspeedlines.value == 2)
speedcolor = (leveltime & 1) ? playercolor : speedcolor;
}
}
if (cv_coloredspeedlines.value != 3)
{
if (player->kartstuff[k_eggmanexplode])
{
// Make it red when you have the eggman speed boost
speedcolor = SKINCOLOR_RED;
}
else if (player->kartstuff[k_invincibilitytimer])
{
speedcolor = playercolor;
}
}
return speedcolor;
}
typedef INT32 (*randomFunc)(INT32 min, INT32 max);
FUNCINLINE static ATTRINLINE void K_SpawnNormalSpeedLines(player_t *player, boolean synched)
{
const randomFunc randomfunc = synched ? P_RandomRange : M_RandomRange;
fixed_t rand_x;
fixed_t rand_y;
fixed_t rand_z;
rand_z = player->mo->z + (player->mo->height/2) + (randomfunc(-20,20) * player->mo->scale);
rand_y = player->mo->y + (randomfunc(-36,36) * player->mo->scale);
rand_x = player->mo->x + (randomfunc(-36,36) * player->mo->scale);
rand_z = player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale);
rand_y = player->mo->y + (P_RandomRange(-36,36) * player->mo->scale);
rand_x = player->mo->x + (P_RandomRange(-36,36) * player->mo->scale);
mobj_t *fast = P_SpawnMobj(rand_x, rand_y, rand_z, MT_FASTLINE);
@@ -5627,7 +5584,7 @@ FUNCINLINE static ATTRINLINE void K_SpawnNormalSpeedLines(player_t *player, bool
fast->momx = 3*player->mo->momx/4;
fast->momy = 3*player->mo->momy/4;
fast->momz = 3*player->mo->momz/4;
fast->islocal = !synched;
//fast->islocal = false;
P_SetTarget(&fast->target, player->mo); // easier lua access
K_MatchGenericExtraFlags(fast, player->mo);
@@ -5638,8 +5595,11 @@ FUNCINLINE static ATTRINLINE void K_SpawnNormalSpeedLines(player_t *player, bool
if (cv_coloredspeedlines.value)
{
fast->color = K_GetSpeedLineColor(player, colorSpeed);
fast->colorized = true;
if (colorSpeed || player->kartstuff[k_invincibilitytimer]) // let invul color them even when players go rather slow
{
fast->color = player->mo->color;
fast->colorized = true;
}
}
if (colorSpeed && K_PlayerEffectsShouldBlend(player))
@@ -5668,11 +5628,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
// Speed lines
if ((player->kartstuff[k_sneakertimer] || player->kartstuff[k_driftboost] || player->kartstuff[k_startboost]) && player->speed > 0)
{
K_SpawnNormalSpeedLines(player, true);
}
else if ((cv_coloredspeedlines.value == 1 || cv_coloredspeedlines.value == 2) && player->kartstuff[k_eggmanexplode]) // gotta love the speedlines calling synched rng :chaosleep:
{
K_SpawnNormalSpeedLines(player, false);
K_SpawnNormalSpeedLines(player);
}
if (player->playerstate == PST_DEAD || player->kartstuff[k_respawn] > 1) // Ensure these are set correctly here
+7 -1
View File
@@ -7319,6 +7319,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
boolean grounded = P_IsObjectOnGround(mobj);
//P_MobjCheckWaterVisual(mobj);
// rotate thrown eggboxes and bananas mid air!
if (cv_bananthrowroll.value && !grounded)
{
// tilt n tumble
@@ -7341,7 +7342,12 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
//P_SpawnItemLandDust(mobj);
}
P_RollPitchMobj(mobj);
// do not rotate eggman items on slopes
// they are meant to deceive the player
// having them rotated makes them stand out a lot more
// since random items do not roll´n pitch on slopes!
if (mobj->type == MT_BANANA)
P_RollPitchMobj(mobj);
if (mobj->threshold > 0)
mobj->threshold--;