mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Revamped roll-on-landing to work even from jumping, for the purposes of slopes! (But not from PF_THOKKED.)
Salt has wanted this for a while, and this was the only branch I had open which it was appropriate for. :P
This commit is contained in:
parent
c04ee6bfb7
commit
ba652864a6
2 changed files with 8 additions and 4 deletions
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -3322,9 +3322,13 @@ static void P_PlayerZMovement(mobj_t *mo)
|
|||
}
|
||||
}
|
||||
|
||||
if (mo->player->pflags & PF_JUMPED)
|
||||
mo->player->pflags &= ~PF_SPINNING;
|
||||
else if (!(mo->player->pflags & PF_USEDOWN))
|
||||
if ((mo->player->charability2 == CA2_SPINDASH) && !(mo->player->pflags & PF_THOKKED) && (mo->player->cmd.buttons & BT_USE) && (FixedHypot(mo->momx, mo->momy) > (5*mo->scale)))
|
||||
{
|
||||
mo->player->pflags |= PF_SPINNING;
|
||||
P_SetPlayerMobjState(mo, S_PLAY_SPIN);
|
||||
S_StartSound(mo, sfx_spin);
|
||||
}
|
||||
else
|
||||
mo->player->pflags &= ~PF_SPINNING;
|
||||
|
||||
if (!(mo->player->pflags & PF_GLIDING))
|
||||
|
|
|
@ -3843,7 +3843,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
}
|
||||
|
||||
// If not moving up or down, and travelling faster than a speed of four while not holding
|
||||
// If not moving up or down, and travelling faster than a speed of five while not holding
|
||||
// down the spin button and not spinning.
|
||||
// AKA Just go into a spin on the ground, you idiot. ;)
|
||||
else if ((cmd->buttons & BT_USE || ((twodlevel || (player->mo->flags2 & MF2_TWOD)) && cmd->forwardmove < -20))
|
||||
|
|
Loading…
Reference in a new issue