mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- fixed: TVector3::Pitch() got the sign inverted.
This caused bad calculations with CMF_OFFSETPITCH. Note that to compensate for the fix, the SphericalCoords function had to have its own inversion of the value removed so that it calculates the same result as before.
This commit is contained in:
parent
5dd49d3eb5
commit
c653a0038f
2 changed files with 2 additions and 2 deletions
|
@ -2132,7 +2132,7 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, SphericalCoords)
|
||||||
|
|
||||||
ACTION_RETURN_VEC3(DVector3(
|
ACTION_RETURN_VEC3(DVector3(
|
||||||
deltaangle(vecTo.Angle(), viewYaw).Degrees,
|
deltaangle(vecTo.Angle(), viewYaw).Degrees,
|
||||||
deltaangle(-vecTo.Pitch(), viewPitch).Degrees,
|
deltaangle(vecTo.Pitch(), viewPitch).Degrees,
|
||||||
vecTo.Length()
|
vecTo.Length()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1417,7 +1417,7 @@ TAngle<T> TVector3<T>::Angle() const
|
||||||
template<class T>
|
template<class T>
|
||||||
TAngle<T> TVector3<T>::Pitch() const
|
TAngle<T> TVector3<T>::Pitch() const
|
||||||
{
|
{
|
||||||
return VecToAngle(TVector2<T>(X, Y).Length(), Z);
|
return -VecToAngle(TVector2<T>(X, Y).Length(), Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Much of this is copied from TVector3. Is all that functionality really appropriate?
|
// Much of this is copied from TVector3. Is all that functionality really appropriate?
|
||||||
|
|
Loading…
Reference in a new issue