mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-22 11:31:11 +00:00
- Rename fixedhoriz::aspitch()
to Degrees()
to match DAngle
objects.
This commit is contained in:
parent
5e11fc1a15
commit
e4ae726015
3 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ public:
|
||||||
constexpr short asbuild() const { return FixedToInt(value); }
|
constexpr short asbuild() const { return FixedToInt(value); }
|
||||||
constexpr double asbuildf() const { return FixedToFloat(value); }
|
constexpr double asbuildf() const { return FixedToFloat(value); }
|
||||||
constexpr fixed_t asq16() const { return value; }
|
constexpr fixed_t asq16() const { return value; }
|
||||||
double aspitch() const { return HorizToPitch(value); }
|
double Degrees() const { return HorizToPitch(value); }
|
||||||
|
|
||||||
bool operator< (fixedhoriz other) const
|
bool operator< (fixedhoriz other) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -228,7 +228,7 @@ void PlayerHorizon::applyinput(float const horz, ESyncBits* actions, double cons
|
||||||
if (horz || *actions & (SB_AIM_UP | SB_AIM_DOWN | SB_LOOK_UP | SB_LOOK_DOWN))
|
if (horz || *actions & (SB_AIM_UP | SB_AIM_DOWN | SB_LOOK_UP | SB_LOOK_DOWN))
|
||||||
{
|
{
|
||||||
// Store current horizon as true pitch.
|
// Store current horizon as true pitch.
|
||||||
double pitch = horiz.aspitch();
|
double pitch = horiz.Degrees();
|
||||||
|
|
||||||
// Process mouse input.
|
// Process mouse input.
|
||||||
if (horz)
|
if (horz)
|
||||||
|
|
|
@ -200,7 +200,7 @@ FRenderViewpoint SetupViewpoint(DCoreActor* cam, const DVector3& position, int s
|
||||||
r_viewpoint.SectCount = sectnum;
|
r_viewpoint.SectCount = sectnum;
|
||||||
r_viewpoint.Pos = { position.X, -position.Y, -position.Z };
|
r_viewpoint.Pos = { position.X, -position.Y, -position.Z };
|
||||||
r_viewpoint.HWAngles.Yaw = FAngle::fromDeg(-90.f + (float)angle.Degrees());
|
r_viewpoint.HWAngles.Yaw = FAngle::fromDeg(-90.f + (float)angle.Degrees());
|
||||||
r_viewpoint.HWAngles.Pitch = FAngle::fromDeg(-horizon.aspitch());
|
r_viewpoint.HWAngles.Pitch = FAngle::fromDeg(-horizon.Degrees());
|
||||||
r_viewpoint.HWAngles.Roll = FAngle::fromDeg(-(float)rollang.Degrees());
|
r_viewpoint.HWAngles.Roll = FAngle::fromDeg(-(float)rollang.Degrees());
|
||||||
r_viewpoint.FieldOfView = FAngle::fromDeg(fov > 0? fov : (float)r_fov);
|
r_viewpoint.FieldOfView = FAngle::fromDeg(fov > 0? fov : (float)r_fov);
|
||||||
r_viewpoint.RotAngle = angle.BAMs();
|
r_viewpoint.RotAngle = angle.BAMs();
|
||||||
|
|
Loading…
Reference in a new issue