From 94a29457f031cf1aa96d403aa6230f34bbef5747 Mon Sep 17 00:00:00 2001
From: divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Mon, 12 Jul 2010 18:02:28 +0000
Subject: [PATCH] Half fix TODO 2 with a simple check. The view doesn't roll
 when not touching the ground, but needs to return to 0 smoothly rather than
 instantly when you jump / fall.

From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10278 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=1f02390d48f5d4e78d5867016e17e405fff33b31
---
 view.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/view.c b/view.c
index e5420574..fc20b6eb 100644
--- a/view.c
+++ b/view.c
@@ -667,9 +667,10 @@ void V_CalcRefdef (void)
 
 					// view rolling code
 					// TODO 1: Make it work around the center rather than the left side
-					// TODO 2: Don't bob roll when not touching the ground
-					// TODO 3: Write cvars in darkplaces.txt, set better defaults and possibly disable by default once the first TODOs are ready.
+					// TODO 2: Make the roll smoothly return to 0 when you stop touching the ground, rather than instantly
+					// TODO 3: Write cvars to darkplaces.txt, set better defaults and possibly disable by default once the first TODOs are ready
 					if (cl_bobroll.value && cl_bobrollcycle.value)
+					if (cl.onground)
 					{
 						cycle = cl.time / cl_bobrollcycle.value;
 						cycle -= (int) cycle;
-- 
2.39.5