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
|
@ -3366,7 +3366,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
// skipping stone!
|
// 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)
|
&& ((p->pflags & (PF_SPINNING|PF_JUMPED)) == PF_SPINNING)
|
||||||
&& ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop)
|
&& ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop)
|
||||||
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom)))
|
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom)))
|
||||||
|
|
|
@ -4503,7 +4503,7 @@ DoneSection2:
|
||||||
|
|
||||||
P_InstaThrust(player->mo, player->mo->angle, linespeed);
|
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))
|
if (!(player->pflags & PF_SPINNING))
|
||||||
player->pflags |= PF_SPINNING;
|
player->pflags |= PF_SPINNING;
|
||||||
|
@ -4669,7 +4669,7 @@ DoneSection2:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // Make player spin
|
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;
|
player->pflags |= PF_SPINNING;
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||||
|
|
|
@ -2329,7 +2329,8 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
||||||
P_MobjCheckWater(player->mo);
|
P_MobjCheckWater(player->mo);
|
||||||
if (player->pflags & PF_SPINNING)
|
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);
|
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||||
S_StartSound(player->mo, sfx_spin);
|
S_StartSound(player->mo, sfx_spin);
|
||||||
|
@ -4525,6 +4526,9 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
||||||
|
|
||||||
player->pflags |= P_GetJumpFlags(player);;
|
player->pflags |= P_GetJumpFlags(player);;
|
||||||
|
|
||||||
|
if (player->charflags & SF_NOJUMPDAMAGE)
|
||||||
|
player->pflags &= ~PF_SPINNING;
|
||||||
|
|
||||||
if (soundandstate)
|
if (soundandstate)
|
||||||
{
|
{
|
||||||
if (!player->spectator)
|
if (!player->spectator)
|
||||||
|
|
Loading…
Reference in New Issue