mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Fun gameplay tweak: Turn CA_FLOAT into a limited CA_SLOWFALL when moving slowly, to double down on it being for speedrun characters and punishing slowing down. Rob-approved.
This commit is contained in:
parent
578b809557
commit
5164ee7fc9
1 changed files with 9 additions and 7 deletions
16
src/p_user.c
16
src/p_user.c
|
@ -4381,13 +4381,15 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
if (player->secondjump == 1)
|
||||
{
|
||||
if (player->charability == CA_FLOAT)
|
||||
player->mo->momz = 0;
|
||||
else if (player->charability == CA_SLOWFALL)
|
||||
{
|
||||
if (P_MobjFlip(player->mo)*player->mo->momz < -gravity*4)
|
||||
player->mo->momz = P_MobjFlip(player->mo)*-gravity*4;
|
||||
}
|
||||
fixed_t potentialmomz;
|
||||
if (player->charability == CA_SLOWFALL)
|
||||
potentialmomz = -gravity*4;
|
||||
else
|
||||
potentialmomz = ((player->speed < 10*player->mo->scale)
|
||||
? (player->speed - 10*player->mo->scale)/5
|
||||
: 0);
|
||||
if (P_MobjFlip(player->mo)*player->mo->momz < potentialmomz)
|
||||
player->mo->momz = P_MobjFlip(player->mo)*potentialmomz;
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue