Slight adjustments to yellow spark nuances

Instead of setting you to yellow sparks when before you could keep red sparks, it keeps your previous "state". When going below 20 speed when you have sparks, you no longer stop charging sparks, but you have to break above 20 speed once you have yellow sparks to get normal sparks again.
This commit is contained in:
Sally Cochenour 2020-03-14 18:12:36 -04:00
parent c6f3ac651e
commit f37b1268b4

View file

@ -5897,20 +5897,23 @@ static void K_KartDrift(player_t *player, boolean onground)
&& !EITHERSNEAKER(player)))
driftadditive = 0;
if (player->speed >= minspeed*2)
// Inbetween minspeed and minspeed*2, it'll keep your previous drift-spark state.
if (player->speed > minspeed*2)
{
player->kartstuff[k_getsparks] = 1;
if (player->kartstuff[k_driftcharge] <= -1)
player->kartstuff[k_driftcharge] = dsone;
player->kartstuff[k_driftcharge] = dsone; // Back to red
}
else
else if (player->speed <= minspeed)
{
player->kartstuff[k_getsparks] = 0;
driftadditive = 0;
if (player->kartstuff[k_driftcharge] >= dsone)
player->kartstuff[k_driftcharge] = -1;
player->kartstuff[k_driftcharge] = -1; // Set yellow sparks
else
player->kartstuff[k_driftcharge] = 0; // No sparks
}
// This spawns the drift sparks