From: divverent Date: Mon, 12 Jul 2010 18:02:28 +0000 (+0000) Subject: Half fix TODO 2 with a simple check. The view doesn't roll when not touching the... X-Git-Tag: xonotic-v0.1.0preview~230^2~200 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1f02390d48f5d4e78d5867016e17e405fff33b31;p=xonotic%2Fdarkplaces.git 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 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10278 d7cf8633-e32d-0410-b094-e92efae38249 --- 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;