]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Second change: Use cos for the horizontal view bobbing while leaving sin for the...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Jul 2010 17:16:27 +0000 (17:16 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Jul 2010 17:16:27 +0000 (17:16 +0000)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10353 d7cf8633-e32d-0410-b094-e92efae38249

view.c

diff --git a/view.c b/view.c
index 9e4a7f05a1641f9f2b3939162ff1e651354b24a1..b72bd03ea418afb3dd6c957d6d0233e3fc3b6e3d 100644 (file)
--- a/view.c
+++ b/view.c
@@ -680,9 +680,9 @@ void V_CalcRefdef (void)
                                                cycle = cl.time / cl_bob2cycle.value;
                                                cycle -= (int) cycle;
                                                if (cycle < 0.5)
-                                                       cycle = sin(M_PI * cycle / 0.5);
+                                                       cycle = cos(M_PI * cycle / 0.5); // cos looks better here with the other view bobbing using sin
                                                else
-                                                       cycle = sin(M_PI + M_PI * (cycle-0.5)/0.5);
+                                                       cycle = cos(M_PI + M_PI * (cycle-0.5)/0.5);
                                                bob = bound(0, cl_bob2.value, 0.05) * cycle;
 
                                                // this value slowly decreases from 1 to 0 when we stop touching the ground.