Skip to content

Commit

Permalink
Use DEG2RAD for some angles
Browse files Browse the repository at this point in the history
  • Loading branch information
SquareMan committed Jul 10, 2024
1 parent 4d5d823 commit 463cb0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SB/Game/zEntPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ static xVec3 lastDeltaPos;
static xVec3 lastFloorNorm;
static xEnt* lastFloorEnt;
static U32 surfSticky;
static F32 surfSlideStart = 0.34906587f; // Is this some sensible fraction?
static F32 surfSlideStop = 0.17453294f; // ditto
static F32 surfSlideStart = DEG2RAD(20);
static F32 surfSlideStop = DEG2RAD(10);
F32 surfSlickRatio;
static F32 surfSlickTimer;
static F32 surfPeakRatio = 1.25f;
Expand Down Expand Up @@ -858,7 +858,7 @@ static void PlayerAbsControl(xEnt* ent, F32 x, F32 z, F32 dt)
}

// FIXME: Using our PI constant here is off by one bit with the resulting float constant
targetLean = -targetLean / (3.1415926f / 3.6f);
targetLean = -targetLean / DEG2RAD(50);

if (targetLean < -1.0f)
{
Expand Down

0 comments on commit 463cb0f

Please sign in to comment.