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:
toasterbabe 2016-09-02 17:27:39 +01:00
parent ffd36563a8
commit 73843764de
2 changed files with 14 additions and 6 deletions

View file

@ -325,10 +325,11 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
}
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.
if (player->dashspeed > 2*speed)
fixed_t step = (player->maxdash - player->mindash)/4;
speed = (player->dashspeed - player->mindash);
if (speed > 3*step)
mobj->tics = 1;
else if (player->dashspeed > speed)
else if (speed > step)
mobj->tics = 2;
else
mobj->tics = 3;

View file

@ -3731,15 +3731,22 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
player->dashtime = 0;
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
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))
{
#define chargecalculation (6*(player->dashspeed - player->mindash))/(player->maxdash - player->mindash)
fixed_t soundcalculation = chargecalculation;
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)
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.
if (player->revitem)
@ -3748,7 +3755,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
if (demorecording)
G_GhostAddRev();
}
}
}*/
}
// If not moving up or down, and travelling faster than a speed of four while not holding
// down the spin button and not spinning.