mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
* Fixed issue where CA_BOUNCE users can harmlessly bounce on deathpits (and not Cakewalk style!)
* Minor quality-of-life improvements to CA_BOUNCE handling.
This commit is contained in:
parent
10a137620a
commit
0a7fe9569d
2 changed files with 6 additions and 5 deletions
|
@ -3316,7 +3316,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
|||
}
|
||||
}
|
||||
|
||||
if (mo->player->pflags & PF_BOUNCING)
|
||||
if (mo->player->pflags & PF_BOUNCING && !P_CheckDeathPitCollide(mo))
|
||||
{
|
||||
fixed_t prevmomz = P_MobjFlip(mo)*abs(mo->momz);
|
||||
if (mo->eflags & MFE_UNDERWATER)
|
||||
|
@ -3326,7 +3326,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
|||
S_StartSound(mo, sfx_boingf);
|
||||
P_DoJump(mo->player, false);
|
||||
P_SetPlayerMobjState(mo, S_PLAY_BOUNCE_LANDING);
|
||||
mo->player->pflags |= PF_BOUNCING;
|
||||
mo->player->pflags |= PF_BOUNCING|PF_THOKKED;
|
||||
mo->player->jumping = 0;
|
||||
mo->momz = (FixedMul(mo->momz, 3*FRACUNIT/2) + prevmomz)/2;
|
||||
clipmomz = false;
|
||||
|
@ -4153,7 +4153,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
mobj->eflags &= ~MFE_JUSTSTEPPEDDOWN;
|
||||
|
||||
if (mobj->state-states == S_PLAY_BOUNCE_LANDING)
|
||||
goto animonly;
|
||||
goto animonly; // no need for checkposition - doesn't move at ALL
|
||||
|
||||
// Zoom tube
|
||||
if (mobj->tracer)
|
||||
|
|
|
@ -4283,9 +4283,10 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE);
|
||||
player->pflags &= ~PF_JUMPED;
|
||||
player->pflags |= PF_BOUNCING;
|
||||
player->pflags |= PF_THOKKED|PF_BOUNCING;
|
||||
player->mo->momx >>= 1;
|
||||
player->mo->momy >>= 1;
|
||||
player->mo->momz >>= 1;
|
||||
}
|
||||
break;
|
||||
case CA_TWINSPIN:
|
||||
|
@ -6746,9 +6747,9 @@ static void P_MovePlayer(player_t *player)
|
|||
}
|
||||
else
|
||||
{
|
||||
player->pflags |= PF_THOKKED;
|
||||
player->mo->momx >>= 1;
|
||||
player->mo->momy >>= 1;
|
||||
player->mo->momz >>= 1;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue