]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - view.c
More progress, still nothing considerable
[xonotic/darkplaces.git] / view.c
diff --git a/view.c b/view.c
index 81a448fe94cad7e9562285e9c0a4d92b2b1c5646..0cd7b478b4ccc5b27bb9ddde494ba4911f8f4bee 100644 (file)
--- a/view.c
+++ b/view.c
@@ -716,15 +716,17 @@ void V_CalcRefdef (void)
                                        
                                        // TEST!!!
 
-                                       float ground_hit_target;
                                        // get the speed while in the air, apply it while we're not
                                        if (!cl.onground)
-                                               cl.ground_hit_speed = bound(0, cl.velocity[2] * 0.1, 400); // replace 0.1 with cvar
+                                       {
+                                               cl.ground_hit_speed = 0;
+                                               cl.ground_hit_target = cl.velocity[2] * 0.1; // replace 0.1 with cvar
+                                       }
                                        else
                                        {
-                                               if(cl.ground_hit_speed > ground_hit_target)
+                                               if(cl.ground_hit_speed > cl.ground_hit_target)
                                                        cl.ground_hit_speed -= 0.1; // replace 0.1 with cvar
-                                               if(cl.ground_hit_speed < ground_hit_target)
+                                               if(cl.ground_hit_speed < cl.ground_hit_target)
                                                        cl.ground_hit_speed += 0.1; // replace 0.1 with cvar
 
                                                vieworg[2] += cl.ground_hit_speed;