mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Merge branch 'amyswings' into 'next'
Restore jump-related pflags properly during twinspin See merge request STJr/SRB2!908
This commit is contained in:
commit
d9ed914e14
1 changed files with 11 additions and 12 deletions
23
src/p_user.c
23
src/p_user.c
|
@ -5004,6 +5004,15 @@ void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range)
|
||||||
player->pflags |= PF_THOKKED;
|
player->pflags |= PF_THOKKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void P_DoTwinSpin(player_t *player)
|
||||||
|
{
|
||||||
|
player->pflags &= ~PF_NOJUMPDAMAGE;
|
||||||
|
player->pflags |= P_GetJumpFlags(player) | PF_THOKKED;
|
||||||
|
S_StartSound(player->mo, sfx_s3k42);
|
||||||
|
player->mo->frame = 0;
|
||||||
|
P_SetPlayerMobjState(player->mo, S_PLAY_TWINSPIN);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_DoJumpStuff
|
// P_DoJumpStuff
|
||||||
//
|
//
|
||||||
|
@ -5174,12 +5183,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
break;
|
break;
|
||||||
case CA_TWINSPIN:
|
case CA_TWINSPIN:
|
||||||
if ((player->charability2 == CA2_MELEE) && (!(player->pflags & (PF_THOKKED|PF_USEDOWN)) || player->charflags & SF_MULTIABILITY))
|
if ((player->charability2 == CA2_MELEE) && (!(player->pflags & (PF_THOKKED|PF_USEDOWN)) || player->charflags & SF_MULTIABILITY))
|
||||||
{
|
P_DoTwinSpin(player);
|
||||||
player->pflags |= PF_THOKKED;
|
|
||||||
S_StartSound(player->mo, sfx_s3k42);
|
|
||||||
player->mo->frame = 0;
|
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_TWINSPIN);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -5436,12 +5440,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
break;
|
break;
|
||||||
case CA_TWINSPIN:
|
case CA_TWINSPIN:
|
||||||
if (!(player->pflags & PF_THOKKED) || player->charflags & SF_MULTIABILITY)
|
if (!(player->pflags & PF_THOKKED) || player->charflags & SF_MULTIABILITY)
|
||||||
{
|
P_DoTwinSpin(player);
|
||||||
player->pflags |= PF_THOKKED;
|
|
||||||
S_StartSound(player->mo, sfx_s3k42);
|
|
||||||
player->mo->frame = 0;
|
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_TWINSPIN);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue