Skip to content

Commit

Permalink
remove unnecessary version consistency for some player movement code
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Aug 16, 2024
1 parent a8fd512 commit 12f4e9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions regamedll/pm_shared/pm_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ void PM_WalkMove()

#ifdef REGAMEDLL_ADD
// Player can speed up the run if '+speed' button is pressed
if (pmoveplayer->m_MovementVersion.IsAtLeast(1, 0) && (pmove->cmd.buttons & IN_RUN) && pmove->fuser3 > 0)
if ((pmove->cmd.buttons & IN_RUN) && pmove->fuser3 > 0)
{
fmove *= pmove->fuser3;
smove *= pmove->fuser3;
Expand Down Expand Up @@ -1704,7 +1704,7 @@ void PM_SpectatorMove()

#ifdef REGAMEDLL_ADD
// Observer can accelerate in air if '+speed' button is pressed
if (pmoveplayer->m_MovementVersion.IsAtLeast(1, 0) && pmove->cmd.buttons & IN_RUN)
if (pmove->cmd.buttons & IN_RUN)
{
float flAirAccelerate = (pmove->fuser3 > 0.0f) ? pmove->fuser3 : max(pmove->movevars->airaccelerate / 100.0f, 7.0f);
fmove *= flAirAccelerate;
Expand Down Expand Up @@ -2368,7 +2368,7 @@ void PM_NoClip()

#ifdef REGAMEDLL_ADD
// Player with noclip can accelerate in air if '+speed' button is pressed
if (pmoveplayer->m_MovementVersion.IsAtLeast(1, 0) && (pmove->cmd.buttons & IN_RUN) && pmove->fuser3 > 0)
if ((pmove->cmd.buttons & IN_RUN) && pmove->fuser3 > 0)
{
float flAirAccelerate = pmove->fuser3;
fmove *= flAirAccelerate;
Expand Down

0 comments on commit 12f4e9b

Please sign in to comment.