Fixes rotations in twig.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3112 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
88aa502054
commit
a7ee0f883d
1 changed files with 2 additions and 3 deletions
|
@ -2021,7 +2021,6 @@ void PF_vectoangles (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
|
|
||||||
if (value1[1] == 0 && value1[0] == 0)
|
if (value1[1] == 0 && value1[0] == 0)
|
||||||
{
|
{
|
||||||
yaw = 0;
|
|
||||||
if (value1[2] > 0)
|
if (value1[2] > 0)
|
||||||
{
|
{
|
||||||
pitch = 90;
|
pitch = 90;
|
||||||
|
@ -2037,7 +2036,7 @@ void PF_vectoangles (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yaw = atan2(value1[1], value1[0]);
|
yaw = atan2(value1[1], value1[0]);
|
||||||
pitch = atan2(value1[2], sqrt (value1[0]*value1[0] + value1[1]*value1[1]));
|
pitch = -atan2(value1[2], sqrt (value1[0]*value1[0] + value1[1]*value1[1]));
|
||||||
|
|
||||||
if (up)
|
if (up)
|
||||||
{
|
{
|
||||||
|
@ -2056,7 +2055,7 @@ void PF_vectoangles (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
roll = 0;
|
roll = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pitch *= 180 / M_PI;
|
pitch *= -180 / M_PI;
|
||||||
yaw *= 180 / M_PI;
|
yaw *= 180 / M_PI;
|
||||||
roll *= 180 / M_PI;
|
roll *= 180 / M_PI;
|
||||||
if (pitch < 0)
|
if (pitch < 0)
|
||||||
|
|
Loading…
Reference in a new issue