From 64832afd3bbc0e242cc37c6f65c6413da73a0bb9 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 16 Jul 2010 22:24:29 +0000 Subject: [PATCH] More progress, still nothing considerable From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10339 d7cf8633-e32d-0410-b094-e92efae38249 --- client.h | 1 + view.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client.h b/client.h index 8b9298df..7769d5fa 100644 --- a/client.h +++ b/client.h @@ -980,6 +980,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 81a448fe..0cd7b478 100644 --- 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; -- 2.39.2