Merge branch 'drift-clip-up-slope' into 'master'

Even more drift boost fx

See merge request KartKrew/Kart!301
This commit is contained in:
Sal 2020-07-22 22:14:58 -04:00
commit ecc93e059c
4 changed files with 24 additions and 2 deletions

View file

@ -1685,6 +1685,9 @@ void K_SpawnDriftBoostClip(player_t *player)
clip->fuse = 105; clip->fuse = 105;
clip->momz = 7 * P_MobjFlip(clip) * clip->scale; clip->momz = 7 * P_MobjFlip(clip) * clip->scale;
if (player->mo->momz > 0)
clip->momz += player->mo->momz;
P_InstaThrust(clip, player->mo->angle + P_InstaThrust(clip, player->mo->angle +
K_RandomFlip(P_RandomRange(FRACUNIT/2, FRACUNIT)), K_RandomFlip(P_RandomRange(FRACUNIT/2, FRACUNIT)),
FixedMul(scale, player->speed)); FixedMul(scale, player->speed));
@ -3166,6 +3169,7 @@ static void K_SpawnDriftSparks(player_t *player)
{ {
// transition // transition
P_SetScale(spark, (spark->destscale = spark->scale*3/2)); P_SetScale(spark, (spark->destscale = spark->scale*3/2));
S_StartSound(player->mo, sfx_cock);
} }
else else
{ {
@ -6425,6 +6429,8 @@ static void K_SpawnDriftBoostExplosion(player_t *player, int stage)
S_StartSound(player->mo, sfx_s3kc4l); S_StartSound(player->mo, sfx_s3kc4l);
break; break;
} }
overlay->extravalue1 = stage;
} }
static void K_KartDrift(player_t *player, boolean onground) static void K_KartDrift(player_t *player, boolean onground)

View file

@ -8347,8 +8347,22 @@ void P_MobjThinker(mobj_t *mobj)
else if (mobj->fuse > 32) else if (mobj->fuse > 32)
mobj->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))); mobj->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1)));
if (mobj->fuse == 17 || mobj->fuse == 33)/* to red/blue */ switch (mobj->extravalue1)
K_SpawnDriftBoostClip(mobj->target->player); {
case 3:/* rainbow boost */
/* every 20 tics, bang! */
if (( 120 - mobj->fuse ) % 10 == 0)
{
K_SpawnDriftBoostClip(mobj->target->player);
S_StartSound(mobj->target, sfx_s3k77);
}
break;
case 2:/* blue boost */
if (mobj->fuse == 16)/* to red*/
K_SpawnDriftBoostClip(mobj->target->player);
break;
}
{ {
player_t *p = NULL; player_t *p = NULL;

View file

@ -820,6 +820,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"sploss", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Down to yellow sparks {"sploss", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Down to yellow sparks
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree: {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // :shitsfree:
{"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Debug notification {"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Debug notification
{"cock", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Hammer cocks, bang bang
// SRB2Kart - Engine sounds // SRB2Kart - Engine sounds
// Engine class A // Engine class A

View file

@ -897,6 +897,7 @@ typedef enum
sfx_sploss, sfx_sploss,
sfx_itfree, sfx_itfree,
sfx_dbgsal, sfx_dbgsal,
sfx_cock,
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy... // Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
// Engine class A - Low Speed, Low Weight // Engine class A - Low Speed, Low Weight