From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10342
d7cf8633-e32d-0410-b094-
e92efae38249
double lastongroundtime;
double hitgroundtime;
float bob2_smooth;
double lastongroundtime;
double hitgroundtime;
float bob2_smooth;
+ float ground_hit_counter;
// don't change view angle, full screen, etc
int intermission;
// don't change view angle, full screen, etc
int intermission;
if (!cl.onground)
{
cl.ground_hit_speed = cl.velocity[2] * 0.1; // replace 0.1 with cvar
if (!cl.onground)
{
cl.ground_hit_speed = cl.velocity[2] * 0.1; // replace 0.1 with cvar
+ cl.ground_hit_counter = 1;
- if(cl.ground_hit_speed < 0)
- cl.ground_hit_speed += 0.1; // replace 0.1 with cvar
+ if(cl.ground_hit_counter > 0)
+ cl.ground_hit_counter -= 0.1; // replace 0.1 with cvar
- cl.ground_hit_speed = 0;
+ cl.ground_hit_counter = 0;
- vieworg[2] += sin(M_PI + M_PI * cl.ground_hit_speed * 1);
- gunorg[2] += sin(M_PI + M_PI * cl.ground_hit_speed * 1);
+ vieworg[2] += sin(M_PI + M_PI * cl.ground_hit_counter) * -cl.ground_hit_speed;
+ gunorg[2] += sin(M_PI + M_PI * cl.ground_hit_counter) * -cl.ground_hit_speed;