mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Move constant from previous commit into the class with the other constants.
This commit is contained in:
parent
df30c01472
commit
b179079168
2 changed files with 3 additions and 3 deletions
|
@ -516,7 +516,6 @@ void PlayerAngles::doViewTilting(InputPacket* const pInput, const DVector2& nVel
|
|||
{
|
||||
// Scale/attenuate tilting based on player actions.
|
||||
const auto runScale = 1. / (!(pInput->actions & SB_RUN) + 1);
|
||||
const auto avelScale = (1966426. / 12000000.);
|
||||
const auto waterScale = 1. / (bUnderwater + 1);
|
||||
const auto strafeScale = !!pInput->svel + 1;
|
||||
|
||||
|
@ -524,7 +523,7 @@ void PlayerAngles::doViewTilting(InputPacket* const pInput, const DVector2& nVel
|
|||
{
|
||||
// Console-like yaw rolling. Adjustment == ~(90/32) for keyboard turning. Clamp is 1.5x this value.
|
||||
const auto rollAdj = DAngle::fromDeg(pInput->avel * cl_viewtiltscale);
|
||||
const auto rollAmp = DAngle::fromDeg(avelScale * waterScale);
|
||||
const auto rollAmp = DAngle::fromDeg(ROLL_TILTAVELSCALE * waterScale);
|
||||
const auto rollMax = DAngle::fromDeg((90. / 32. * 1.5) * cl_viewtiltscale);
|
||||
scaletozero(pActor->spr.Angles.Roll, ROLL_TILTRETURN);
|
||||
pActor->spr.Angles.Roll = clamp(pActor->spr.Angles.Roll + rollAdj * rollAmp, -rollMax, rollMax);
|
||||
|
|
|
@ -153,6 +153,7 @@ private:
|
|||
DCoreActor* pActor;
|
||||
|
||||
// Constants used throughout input functions.
|
||||
static constexpr double ROLL_TILTAVELSCALE = (1966426. / 12000000.);
|
||||
static constexpr double ROLL_TILTRETURN = 15.;
|
||||
static constexpr double YAW_LOOKINGSPEED = 801.5625;
|
||||
static constexpr double YAW_ROTATESPEED = 63.28125;
|
||||
|
@ -164,7 +165,7 @@ private:
|
|||
static constexpr double PITCH_CENTERSPEED = 10.7375;
|
||||
static constexpr double PITCH_HORIZOFFSPEED = 4.375;
|
||||
static constexpr DAngle PITCH_CNTRSINEOFFSET = DAngle90 / 8.;
|
||||
static constexpr DAngle PITCH_HORIZOFFCLIMB = DAngle::fromDeg(-38.);
|
||||
static constexpr DAngle PITCH_HORIZOFFCLIMB = DAngle::fromDeg(-127076387. / 3344227.);
|
||||
static constexpr double PITCH_HORIZOFFPUSH = (14115687. / 31535389.);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue