Skip to content

Commit

Permalink
game: Add less flight friction and prevent from doing a jumping actio…
Browse files Browse the repository at this point in the history
…n on slopes when flying
  • Loading branch information
LegendaryGuard committed Feb 8, 2024
1 parent 377db59 commit 4c5e8ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/game/bg_pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ float pm_flyaccelerate = 8.0f;

float pm_friction = 6.0f;
float pm_waterfriction = 1.0f;
float pm_flightfriction = 3.0f;
float pm_flightfriction = 2.0f; // BFP - Add less flight friction, before 3.0f
float pm_spectatorfriction = 5.0f;

int c_pmove = 0;
Expand Down Expand Up @@ -1168,6 +1168,11 @@ static void PM_GroundTrace( void ) {
pml.groundPlane = qtrue;
pml.walking = qfalse;

// BFP - If flying, prevent from doing a jumping action on slopes
if ( pm->ps->pm_flags & PMF_FLYING ) {
return;
}

// BFP - Handle if the player is trying to jump and/or do another movements
// when stepping the steep slopes
if ( PM_CheckJump () ) {
Expand Down

0 comments on commit 4c5e8ce

Please sign in to comment.