mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'spindash-in-flashing' into 'master'
Allow spindash while flashing, but you lose rings while doing so. See merge request KartKrew/Kart!368
This commit is contained in:
commit
f467c051d5
4 changed files with 23 additions and 8 deletions
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -7526,11 +7526,14 @@ static void K_KartSpindash(player_t *player)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->speed < 6*mapobjectscale && player->powers[pw_flashing] == 0)
|
if (player->speed == 0 && cmd->turning != 0 && leveltime % 8 == 0)
|
||||||
{
|
{
|
||||||
if (cmd->turning != 0 && leveltime % 8 == 0)
|
// Rubber burn turn sfx
|
||||||
S_StartSound(player->mo, sfx_ruburn);
|
S_StartSound(player->mo, sfx_ruburn);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player->speed < 6*player->mo->scale)
|
||||||
|
{
|
||||||
if ((cmd->buttons & (BT_DRIFT|BT_BRAKE)) == (BT_DRIFT|BT_BRAKE))
|
if ((cmd->buttons & (BT_DRIFT|BT_BRAKE)) == (BT_DRIFT|BT_BRAKE))
|
||||||
{
|
{
|
||||||
INT16 chargetime = MAXCHARGETIME - ++player->kartstuff[k_spindash];
|
INT16 chargetime = MAXCHARGETIME - ++player->kartstuff[k_spindash];
|
||||||
|
|
@ -7547,6 +7550,15 @@ static void K_KartSpindash(player_t *player)
|
||||||
K_KartSpindashWind(player->mo);
|
K_KartSpindashWind(player->mo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->powers[pw_flashing] > 0 && (leveltime & 1) && player->kartstuff[k_hyudorotimer] == 0)
|
||||||
|
{
|
||||||
|
// Every frame that you're invisible from flashing, spill a ring.
|
||||||
|
// Intentionally a lop-sided trade-off, so the game doesn't become
|
||||||
|
// Funky Kong's Ring Racers.
|
||||||
|
|
||||||
|
P_PlayerRingBurst(player, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (chargetime > 0)
|
if (chargetime > 0)
|
||||||
{
|
{
|
||||||
UINT16 soundcharge = 0;
|
UINT16 soundcharge = 0;
|
||||||
|
|
|
||||||
|
|
@ -4229,7 +4229,7 @@ void A_AttractChase(mobj_t *actor)
|
||||||
else
|
else
|
||||||
actor->drawflags &= ~MFD_DONTDRAW;
|
actor->drawflags &= ~MFD_DONTDRAW;
|
||||||
|
|
||||||
// spilled rings have ghost trails and get capped to a certain speed
|
// spilled rings get capped to a certain speed
|
||||||
if (actor->type == (mobjtype_t)actor->info->reactiontime)
|
if (actor->type == (mobjtype_t)actor->info->reactiontime)
|
||||||
{
|
{
|
||||||
const fixed_t maxspeed = 4<<FRACBITS;
|
const fixed_t maxspeed = 4<<FRACBITS;
|
||||||
|
|
@ -4241,9 +4241,6 @@ void A_AttractChase(mobj_t *actor)
|
||||||
actor->momx = FixedMul(FixedDiv(actor->momx, oldspeed), newspeed);
|
actor->momx = FixedMul(FixedDiv(actor->momx, oldspeed), newspeed);
|
||||||
actor->momy = FixedMul(FixedDiv(actor->momy, oldspeed), newspeed);
|
actor->momy = FixedMul(FixedDiv(actor->momy, oldspeed), newspeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!P_IsObjectOnGround(actor))
|
|
||||||
P_SpawnGhostMobj(actor)->tics = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->tracer && actor->tracer->player && actor->tracer->health
|
if (actor->tracer && actor->tracer->player && actor->tracer->health
|
||||||
|
|
|
||||||
|
|
@ -2237,6 +2237,6 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
||||||
while (i < num_rings)
|
while (i < num_rings)
|
||||||
{
|
{
|
||||||
P_FlingBurst(player, fa, z,
|
P_FlingBurst(player, fa, z,
|
||||||
MT_DEBTSPIKE, 90, 3 * player->mo->scale / 2, i++);
|
MT_DEBTSPIKE, 0, 3 * player->mo->scale / 2, i++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2296,6 +2296,11 @@ boolean P_ZMovement(mobj_t *mo)
|
||||||
{
|
{
|
||||||
mom.x = mom.y = 0;
|
mom.x = mom.y = 0;
|
||||||
mom.z = -mom.z/2;
|
mom.z = -mom.z/2;
|
||||||
|
|
||||||
|
if (mo->fuse == 0)
|
||||||
|
{
|
||||||
|
mo->fuse = 90;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (mo->flags & MF_MISSILE)
|
else if (mo->flags & MF_MISSILE)
|
||||||
{
|
{
|
||||||
|
|
@ -9197,6 +9202,7 @@ static void P_DefaultMobjShadowScale(mobj_t *thing)
|
||||||
thing->shadowscale = FRACUNIT;
|
thing->shadowscale = FRACUNIT;
|
||||||
break;
|
break;
|
||||||
case MT_RING:
|
case MT_RING:
|
||||||
|
case MT_FLINGRING:
|
||||||
case MT_DEBTSPIKE:
|
case MT_DEBTSPIKE:
|
||||||
case MT_FLOATINGITEM:
|
case MT_FLOATINGITEM:
|
||||||
case MT_BLUESPHERE:
|
case MT_BLUESPHERE:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue