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:
toasterbabe 2017-02-04 17:08:14 +00:00
parent c04ee6bfb7
commit ba652864a6
2 changed files with 8 additions and 4 deletions

View File

@ -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))

View File

@ -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))