mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
* Changed how CA2_MELEE handles nocontrol to not tweak pw_nocontrol.
* Added CA_TWINSPIN/CA2_MELEE spring boosts. * Made it so you can't land with CA2_MELEE twice. * Fixed stray #endif from NiGHTS fixes.
This commit is contained in:
parent
a4c1c3195f
commit
ee74fa4042
3 changed files with 16 additions and 7 deletions
11
src/p_map.c
11
src/p_map.c
|
@ -134,6 +134,17 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
object->standingslope = NULL; // Okay, now we can't return - no launching off at silly angles for you.
|
||||
#endif
|
||||
|
||||
if (object->player
|
||||
&& ((object->player->charability == CA_TWINSPIN && object->player->panim == PA_ABILITY)
|
||||
|| (object->player->charability2 == CA2_MELEE && object->player->panim == PA_ABILITY2)))
|
||||
{
|
||||
S_StartSound(object, sfx_s3k8b);
|
||||
#define scalefactor ((4*FRACUNIT)/3)
|
||||
horizspeed = FixedMul(horizspeed, scalefactor);
|
||||
vertispeed = FixedMul(vertispeed, FixedSqrt(scalefactor));
|
||||
#undef scalefactor
|
||||
}
|
||||
|
||||
object->eflags |= MFE_SPRUNG; // apply this flag asap!
|
||||
spring->flags &= ~(MF_SOLID|MF_SPECIAL); // De-solidify
|
||||
|
||||
|
|
|
@ -3211,10 +3211,10 @@ static void P_PlayerZMovement(mobj_t *mo)
|
|||
mo->player->skidtime = TICRATE;
|
||||
mo->tics = -1;
|
||||
}
|
||||
else if (mo->player->charability2 == CA2_MELEE && ((mo->player->charability == CA_TWINSPIN && mo->player->panim == PA_ABILITY) || (mo->player->panim == PA_ABILITY2)))
|
||||
else if (mo->player->charability2 == CA2_MELEE && ((mo->player->charability == CA_TWINSPIN && mo->player->panim == PA_ABILITY) || (mo->player->panim == PA_ABILITY2 && mo->state-states != S_PLAY_MELEE_LANDING)))
|
||||
{
|
||||
P_SetPlayerMobjState(mo, S_PLAY_MELEE_LANDING);
|
||||
mo->tics = mo->player->powers[pw_nocontrol] = (mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(mo->movefactor)))>>FRACBITS;
|
||||
mo->tics = (mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(mo->movefactor)))>>FRACBITS;
|
||||
S_StartSound(mo, sfx_s3k8b);
|
||||
}
|
||||
else if (mo->player->pflags & PF_JUMPED || (mo->player->pflags & (PF_SPINNING|PF_USEDOWN)) != (PF_SPINNING|PF_USEDOWN)
|
||||
|
|
|
@ -3833,7 +3833,6 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
else
|
||||
{
|
||||
player->powers[pw_nocontrol] = TICRATE;
|
||||
player->mo->z += P_MobjFlip(player->mo);
|
||||
P_SetObjectMomZ(player->mo, player->mindash, false);
|
||||
if (player->mo->eflags & MFE_UNDERWATER)
|
||||
|
@ -5181,7 +5180,6 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad
|
|||
if (notallowed)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
const INT32 sequence = player->mo->target->threshold;
|
||||
|
@ -6555,9 +6553,9 @@ static void P_MovePlayer(player_t *player)
|
|||
runspd = FixedMul(runspd, player->mo->movefactor);
|
||||
|
||||
// Control relinquishing stuff!
|
||||
if (player->powers[pw_carry] == CR_BRAKGOOP)
|
||||
player->pflags |= PF_FULLSTASIS;
|
||||
else if (player->pflags & PF_GLIDING && player->skidtime)
|
||||
if ((player->powers[pw_carry] == CR_BRAKGOOP)
|
||||
|| (player->pflags & PF_GLIDING && player->skidtime)
|
||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2))
|
||||
player->pflags |= PF_FULLSTASIS;
|
||||
else if (player->powers[pw_nocontrol])
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue