Skip to content

Commit

Permalink
game: When stopping to charge and falling near to the ground, handle …
Browse files Browse the repository at this point in the history
…the PMF flag to play the jump animation when touching a jump pad
  • Loading branch information
LegendaryGuard committed Feb 11, 2024
1 parent fdeb290 commit 820a5c4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions source/game/bg_pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,13 +632,6 @@ static void PM_AirMove( void ) {
float scale;
usercmd_t cmd;

// BFP - Avoid adding friction in the air while charging and flying
if ( ( ( pm->ps->pm_flags & PMF_KI_CHARGE )
|| ( pm->cmd.buttons & BUTTON_KI_CHARGE ) )
&& ( pm->ps->pm_flags & PMF_FLYING ) ) {
return;
}

PM_Friction();

fmove = pm->cmd.forwardmove;
Expand Down Expand Up @@ -1798,6 +1791,7 @@ static void PM_KiChargeAnimation( void ) { // BFP - Ki Charge
if ( ( pm->ps->pm_flags & PMF_KI_CHARGE ) && !( pm->cmd.buttons & BUTTON_KI_CHARGE ) ) {
pm->ps->eFlags &= ~EF_AURA; // Make sure the aura is off, otherwise the ki use proceeds
pm->ps->pm_flags &= ~PMF_KI_CHARGE;
pm->ps->pm_flags &= ~PMF_NEARGROUND; // Make sure to handle the PMF flag
PM_ContinueLegsAnim( LEGS_IDLE ); // Keep the legs when being near to the ground at that height
// do jump animation if it's falling
if ( !( pml.groundTrace.contents & MASK_PLAYERSOLID )
Expand Down

0 comments on commit 820a5c4

Please sign in to comment.