]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
More progress, still nothing considerable
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 16 Jul 2010 22:24:29 +0000 (22:24 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 04:57:05 +0000 (06:57 +0200)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10339 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=64832afd3bbc0e242cc37c6f65c6413da73a0bb9

client.h
view.c

index 266a99dff9d73dd1aae5a7478481c3b7d841c3c7..6123587bec85b7d24802860591b33760b200e8cf 100644 (file)
--- a/client.h
+++ b/client.h
@@ -975,6 +975,7 @@ typedef struct client_state_s
        float bob2_smooth;
        
        float ground_hit_speed;
+       float ground_hit_target;
 
        // don't change view angle, full screen, etc
        int intermission;
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;