mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'no-spin-jump' into 'next'
Fix a Few Spin Related Bugs (Closes #286 and #360) Closes #286 and #360 See merge request STJr/SRB2!1256
This commit is contained in:
commit
c841750868
3 changed files with 8 additions and 4 deletions
|
@ -3366,7 +3366,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
|||
}
|
||||
|
||||
// skipping stone!
|
||||
if (p && (p->charability2 == CA2_SPINDASH) && p->speed/2 > abs(mobj->momz)
|
||||
if (p && p->speed/2 > abs(mobj->momz)
|
||||
&& ((p->pflags & (PF_SPINNING|PF_JUMPED)) == PF_SPINNING)
|
||||
&& ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop)
|
||||
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom)))
|
||||
|
|
|
@ -4503,7 +4503,7 @@ DoneSection2:
|
|||
|
||||
P_InstaThrust(player->mo, player->mo->angle, linespeed);
|
||||
|
||||
if ((lines[i].flags & ML_EFFECT5) && (player->charability2 == CA2_SPINDASH)) // Roll!
|
||||
if (lines[i].flags & ML_EFFECT5) // Roll!
|
||||
{
|
||||
if (!(player->pflags & PF_SPINNING))
|
||||
player->pflags |= PF_SPINNING;
|
||||
|
@ -4669,7 +4669,7 @@ DoneSection2:
|
|||
break;
|
||||
|
||||
case 7: // Make player spin
|
||||
if (!(player->pflags & PF_SPINNING) && P_IsObjectOnGround(player->mo) && (player->charability2 == CA2_SPINDASH))
|
||||
if (!(player->pflags & PF_SPINNING))
|
||||
{
|
||||
player->pflags |= PF_SPINNING;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
|
|
|
@ -2329,7 +2329,8 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
P_MobjCheckWater(player->mo);
|
||||
if (player->pflags & PF_SPINNING)
|
||||
{
|
||||
if (player->mo->state-states != S_PLAY_ROLL && !(player->pflags & PF_STARTDASH))
|
||||
if (!(player->pflags & PF_STARTDASH) && player->panim != PA_ROLL && player->panim != PA_ETC
|
||||
&& player->panim != PA_ABILITY && player->panim != PA_ABILITY2)
|
||||
{
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||
S_StartSound(player->mo, sfx_spin);
|
||||
|
@ -4524,6 +4525,9 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
player->mo->eflags &= ~MFE_APPLYPMOMZ;
|
||||
|
||||
player->pflags |= P_GetJumpFlags(player);;
|
||||
|
||||
if (player->charflags & SF_NOJUMPDAMAGE)
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
|
||||
if (soundandstate)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue