Spawn electric sparks on first blood

This commit is contained in:
lachablock 2021-04-20 16:25:43 +10:00
parent 5e327e09c6
commit b96394415b
3 changed files with 7 additions and 1 deletions

View file

@ -3650,7 +3650,7 @@ static void K_SpawnDriftElectricity(player_t *player)
}
}
static void K_SpawnDriftElectricSparks(player_t *player)
void K_SpawnDriftElectricSparks(player_t *player)
{
SINT8 hdir, vdir, i;
@ -3665,6 +3665,10 @@ static void K_SpawnDriftElectricSparks(player_t *player)
fixed_t sparkradius = 2 * mobjinfo[MT_DRIFTELECTRICSPARK].radius;
UINT16 color = K_DriftSparkColor(player, player->driftcharge);
// if the sparks are spawned from first blood rather than drift boost, color will be SKINCOLOR_NONE. ew!
if (color == SKINCOLOR_NONE)
color = SKINCOLOR_SILVER;
for (hdir = -1; hdir <= 1; hdir += 2)
{
for (vdir = -1; vdir <= 1; vdir += 2)

View file

@ -87,6 +87,7 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
INT32 K_GetKartDriftSparkValue(player_t *player);
INT32 K_GetKartDriftSparkValueForStage(player_t *player, UINT8 stage);
void K_SpawnDriftBoostExplosion(player_t *player, int stage);
void K_SpawnDriftElectricSparks(player_t *player);
void K_KartUpdatePosition(player_t *player);
mobj_t *K_CreatePaperItem(fixed_t x, fixed_t y, fixed_t z, angle_t angle, SINT8 flip, UINT8 type, UINT8 amount);
void K_DropItems(player_t *player);

View file

@ -1897,6 +1897,7 @@ static void K_HandleLapIncrement(player_t *player)
S_StartSound(player->mo, sfx_s23c);
player->startboost = 125;
K_SpawnDriftBoostExplosion(player, 4);
K_SpawnDriftElectricSparks(player);
rainbowstartavailable = false;
}