mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 07:22:10 +00:00
Some more spindash changes. NOTE that this temporarily breaks the charging aura; if we want to, we can either kill that entirely or re-enable it - but none of the main characters are using it, and Lua makes having a dedicated charging aura irrelevant if the main characters don't use it...
* Spindash sound only plays six times during the charge, equally spaced up until you finish charging. * Spindash animation speed increase rebalanced.
This commit is contained in:
parent
ffd36563a8
commit
73843764de
2 changed files with 14 additions and 6 deletions
|
|
@ -325,10 +325,11 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
||||||
}
|
}
|
||||||
else if (player->panim == PA_ABILITY2 && player->charability2 == CA2_SPINDASH)
|
else if (player->panim == PA_ABILITY2 && player->charability2 == CA2_SPINDASH)
|
||||||
{
|
{
|
||||||
speed = player->maxdash/3; // We're using dashspeed as the variable to check against, but reusing speed to reduce the number of calculations done.
|
fixed_t step = (player->maxdash - player->mindash)/4;
|
||||||
if (player->dashspeed > 2*speed)
|
speed = (player->dashspeed - player->mindash);
|
||||||
|
if (speed > 3*step)
|
||||||
mobj->tics = 1;
|
mobj->tics = 1;
|
||||||
else if (player->dashspeed > speed)
|
else if (speed > step)
|
||||||
mobj->tics = 2;
|
mobj->tics = 2;
|
||||||
else
|
else
|
||||||
mobj->tics = 3;
|
mobj->tics = 3;
|
||||||
|
|
|
||||||
13
src/p_user.c
13
src/p_user.c
|
|
@ -3731,15 +3731,22 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
||||||
player->dashtime = 0;
|
player->dashtime = 0;
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||||
player->pflags |= PF_USEDOWN;
|
player->pflags |= PF_USEDOWN;
|
||||||
|
if (!player->spectator)
|
||||||
|
S_StartSound(player->mo, sfx_s3kab); // Make the rev sound! Previously sfx_spndsh.
|
||||||
}
|
}
|
||||||
else if ((cmd->buttons & BT_USE) && (player->pflags & PF_STARTDASH))
|
else if ((cmd->buttons & BT_USE) && (player->pflags & PF_STARTDASH))
|
||||||
{
|
{
|
||||||
|
#define chargecalculation (6*(player->dashspeed - player->mindash))/(player->maxdash - player->mindash)
|
||||||
|
fixed_t soundcalculation = chargecalculation;
|
||||||
player->dashspeed += FRACUNIT;
|
player->dashspeed += FRACUNIT;
|
||||||
|
if (!player->spectator && soundcalculation != chargecalculation)
|
||||||
|
S_StartSound(player->mo, sfx_s3kab); // Make the rev sound! Previously sfx_spndsh.
|
||||||
|
#undef chargecalculation
|
||||||
|
|
||||||
if (!(player->dashtime++ % 5))
|
/*if (!(player->dashtime++ % 5))
|
||||||
{
|
{
|
||||||
if (!player->spectator && player->dashspeed < player->maxdash)
|
if (!player->spectator && player->dashspeed < player->maxdash)
|
||||||
S_StartSound(player->mo, sfx_spndsh); // Make the rev sound!
|
S_StartSound(player->mo, sfx_s3kab); // Make the rev sound! Previously sfx_spndsh.
|
||||||
|
|
||||||
// Now spawn the color thok circle.
|
// Now spawn the color thok circle.
|
||||||
if (player->revitem)
|
if (player->revitem)
|
||||||
|
|
@ -3748,7 +3755,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
||||||
if (demorecording)
|
if (demorecording)
|
||||||
G_GhostAddRev();
|
G_GhostAddRev();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
// If not moving up or down, and travelling faster than a speed of four while not holding
|
// If not moving up or down, and travelling faster than a speed of four while not holding
|
||||||
// down the spin button and not spinning.
|
// down the spin button and not spinning.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue