From c2dcaef8855fc6ce97ce10c544e30d95436b14cd Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 12 Feb 2008 01:37:56 +0000 Subject: [PATCH] reworked cl.viewangles bounding of roll angle, and simplified pitch handling git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8081 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_input.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cl_input.c b/cl_input.c index 1d5127db..b594e933 100644 --- a/cl_input.c +++ b/cl_input.c @@ -490,17 +490,10 @@ void CL_AdjustAngles (void) V_StopPitchDrift (); cl.viewangles[YAW] = ANGLEMOD(cl.viewangles[YAW]); - cl.viewangles[PITCH] = ANGLEMOD(cl.viewangles[PITCH]); - cl.viewangles[ROLL] = ANGLEMOD(cl.viewangles[ROLL]); if (cl.viewangles[YAW] >= 180) cl.viewangles[YAW] -= 360; - if (cl.viewangles[PITCH] >= 180) - cl.viewangles[PITCH] -= 360; - if (cl.viewangles[ROLL] >= 180) - cl.viewangles[ROLL] -= 360; - - cl.viewangles[PITCH] = bound (in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value); - cl.viewangles[ROLL] = bound(-50, cl.viewangles[ROLL], 50); + cl.viewangles[PITCH] = bound(in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value); + cl.viewangles[ROLL] = bound(-180, cl.viewangles[ROLL], 180); } int cl_ignoremousemoves = 2; -- 2.39.2