From a7ee0f883d72a121b7778b0a07d158a1247e1b2b Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 30 Jan 2009 06:32:49 +0000 Subject: [PATCH] Fixes rotations in twig. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3112 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/pr_bgcmd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/common/pr_bgcmd.c b/engine/common/pr_bgcmd.c index 675ee2c86..4be65b8ca 100644 --- a/engine/common/pr_bgcmd.c +++ b/engine/common/pr_bgcmd.c @@ -2021,7 +2021,6 @@ void PF_vectoangles (progfuncs_t *prinst, struct globalvars_s *pr_globals) if (value1[1] == 0 && value1[0] == 0) { - yaw = 0; if (value1[2] > 0) { pitch = 90; @@ -2037,7 +2036,7 @@ void PF_vectoangles (progfuncs_t *prinst, struct globalvars_s *pr_globals) else { 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) { @@ -2056,7 +2055,7 @@ void PF_vectoangles (progfuncs_t *prinst, struct globalvars_s *pr_globals) roll = 0; } - pitch *= 180 / M_PI; + pitch *= -180 / M_PI; yaw *= 180 / M_PI; roll *= 180 / M_PI; if (pitch < 0)