Skip to content

Commit

Permalink
game: Prevent from doing a jumping action on flat ground when flying
Browse files Browse the repository at this point in the history
  • Loading branch information
LegendaryGuard committed Feb 5, 2024
1 parent 7cfb3af commit a264ff9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions source/game/bg_pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,14 +1126,6 @@ static void PM_GroundTrace( void ) {
pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask);
pml.groundTrace = trace;

// BFP - NOTE: Originally, BFP doesn't stop "groundtracing" when the player is flying
#if 0
// BFP - If flying, do nothing when touching the ground
if ( pm->ps->pm_flags & PMF_FLYING ) {
return;
}
#endif

// BFP - No ground trace handling in the water
if ( pm->waterlevel > 1 ) {
return;
Expand Down Expand Up @@ -1226,6 +1218,12 @@ static void PM_GroundTrace( void ) {
return;
}

// BFP - NOTE: Originally, BFP doesn't stop "groundtracing" until here when the player is flying
// BFP - If flying, prevent from doing a jumping action on flat ground
if ( pm->ps->pm_flags & PMF_FLYING ) {
return;
}

pml.groundPlane = qtrue;
pml.walking = qtrue;

Expand Down

0 comments on commit a264ff9

Please sign in to comment.