mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Fix tiny spindash math moment
This commit is contained in:
parent
b6544efceb
commit
b0d5828e79
1 changed files with 5 additions and 6 deletions
11
src/p_user.c
11
src/p_user.c
|
@ -915,7 +915,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
||||||
player->textvar = NTV_BONUSTIMEEND; // Score and grades
|
player->textvar = NTV_BONUSTIMEEND; // Score and grades
|
||||||
player->finishedspheres = (INT16)(player->spheres);
|
player->finishedspheres = (INT16)(player->spheres);
|
||||||
player->finishedrings = (INT16)(player->rings);
|
player->finishedrings = (INT16)(player->rings);
|
||||||
|
|
||||||
// Add score to temp leaderboards
|
// Add score to temp leaderboards
|
||||||
player->lastmaretime = leveltime - player->marebegunat;
|
player->lastmaretime = leveltime - player->marebegunat;
|
||||||
G_AddTempNightsRecords(player, player->marescore, player->lastmaretime, (UINT8)(oldmare + 1));
|
G_AddTempNightsRecords(player, player->marescore, player->lastmaretime, (UINT8)(oldmare + 1));
|
||||||
|
@ -2372,7 +2372,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
||||||
if (dorollstuff)
|
if (dorollstuff)
|
||||||
{
|
{
|
||||||
if ((player->charability2 == CA2_SPINDASH) && !((player->pflags & (PF_SPINNING|PF_THOKKED)) == PF_THOKKED) && !(player->charability == CA_THOK && player->secondjump)
|
if ((player->charability2 == CA2_SPINDASH) && !((player->pflags & (PF_SPINNING|PF_THOKKED)) == PF_THOKKED) && !(player->charability == CA_THOK && player->secondjump)
|
||||||
&& (player->cmd.buttons & BT_SPIN) && (FixedHypot(player->mo->momx, player->mo->momy) > (5*player->mo->scale)))
|
&& (player->cmd.buttons & BT_SPIN) && (FixedHypot(player->mo->momx, player->mo->momy) >= (5*player->mo->scale)))
|
||||||
player->pflags = (player->pflags|PF_SPINNING) & ~PF_THOKKED;
|
player->pflags = (player->pflags|PF_SPINNING) & ~PF_THOKKED;
|
||||||
else if (!(player->pflags & PF_STARTDASH))
|
else if (!(player->pflags & PF_STARTDASH))
|
||||||
player->pflags &= ~PF_SPINNING;
|
player->pflags &= ~PF_SPINNING;
|
||||||
|
@ -4721,7 +4721,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
||||||
// Revving
|
// Revving
|
||||||
else if ((cmd->buttons & BT_SPIN) && (player->pflags & PF_STARTDASH))
|
else if ((cmd->buttons & BT_SPIN) && (player->pflags & PF_STARTDASH))
|
||||||
{
|
{
|
||||||
if (player->speed > 5*player->mo->scale)
|
if (player->speed >= 5*player->mo->scale)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_STARTDASH;
|
player->pflags &= ~PF_STARTDASH;
|
||||||
P_SetMobjState(player->mo, S_PLAY_ROLL);
|
P_SetMobjState(player->mo, S_PLAY_ROLL);
|
||||||
|
@ -4761,9 +4761,8 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
||||||
if (!player->spectator)
|
if (!player->spectator)
|
||||||
S_StartSound(player->mo, sfx_spin);
|
S_StartSound(player->mo, sfx_spin);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
// Catapult the player from a spindash rev!
|
// Catapult the player from a spindash rev!
|
||||||
if (onground && !(player->pflags & PF_SPINDOWN) && (player->pflags & PF_STARTDASH) && (player->pflags & PF_SPINNING))
|
else if (onground && !(player->pflags & PF_SPINDOWN) && (player->pflags & PF_STARTDASH) && (player->pflags & PF_SPINNING))
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_STARTDASH;
|
player->pflags &= ~PF_STARTDASH;
|
||||||
if (player->powers[pw_carry] == CR_BRAKGOOP)
|
if (player->powers[pw_carry] == CR_BRAKGOOP)
|
||||||
|
@ -8766,7 +8765,7 @@ void P_MovePlayer(player_t *player)
|
||||||
if (!(player->mo->momz || player->mo->momx || player->mo->momy) && !(player->mo->eflags & MFE_GOOWATER)
|
if (!(player->mo->momz || player->mo->momx || player->mo->momy) && !(player->mo->eflags & MFE_GOOWATER)
|
||||||
&& player->panim == PA_IDLE && !(player->powers[pw_carry]))
|
&& player->panim == PA_IDLE && !(player->powers[pw_carry]))
|
||||||
P_DoTeeter(player);
|
P_DoTeeter(player);
|
||||||
|
|
||||||
// Toss a flag
|
// Toss a flag
|
||||||
if (G_GametypeHasTeams() && (cmd->buttons & BT_TOSSFLAG) && !(player->powers[pw_super]) && !(player->tossdelay))
|
if (G_GametypeHasTeams() && (cmd->buttons & BT_TOSSFLAG) && !(player->powers[pw_super]) && !(player->tossdelay))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue