Pressing against wall Note that overbounce is only affecting the backwards direction. Original velocity: -0.025770 0.000000 -690.400024 Overbounced velocity: -0.025770 -0.001000 -690.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -687.200012 Overbounced velocity: -0.025770 -0.001000 -687.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -690.400024 Overbounced velocity: -0.025770 -0.001000 -690.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -693.200012 Overbounced velocity: -0.025770 -0.001000 -693.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -696.400024 Overbounced velocity: -0.025770 -0.001000 -696.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -693.200012 Overbounced velocity: -0.025770 -0.001000 -693.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -696.400024 Overbounced velocity: -0.025770 -0.001000 -696.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -699.200012 Overbounced velocity: -0.025770 -0.001000 -699.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -702.400024 Overbounced velocity: -0.025770 -0.001000 -702.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -699.200012 Overbounced velocity: -0.025770 -0.001000 -699.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -702.400024 Overbounced velocity: -0.025770 -0.001000 -702.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -705.200012 Overbounced velocity: -0.025770 -0.001000 -705.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -708.400024 Overbounced velocity: -0.025770 -0.001000 -708.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -705.200012 Overbounced velocity: -0.025770 -0.001000 -705.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -708.400024 Overbounced velocity: -0.025770 -0.001000 -708.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -711.200012 Overbounced velocity: -0.025770 -0.001000 -711.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -714.400024 Overbounced velocity: -0.025770 -0.001000 -714.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -711.200012 Overbounced velocity: -0.025770 -0.001000 -711.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -714.400024 Overbounced velocity: -0.025770 -0.001000 -714.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -717.200012 Overbounced velocity: -0.025770 -0.001000 -717.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -720.400024 Overbounced velocity: -0.025770 -0.001000 -720.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -717.200012 Overbounced velocity: -0.025770 -0.001000 -717.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.025770 0.000000 -720.400024 Overbounced velocity: -0.025770 -0.001000 -720.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.009537 0.000000 -723.200012 Overbounced velocity: -0.009537 -0.001000 -723.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.009537 0.000000 -726.400024 Overbounced velocity: -0.009537 -0.001000 -726.400024 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.009537 0.000000 -723.200012 Overbounced velocity: -0.009537 -0.001000 -723.200012 Difference: 0.000000 -0.001000 0.000000 Original velocity: -0.009537 0.000000 -726.400024 Overbounced velocity: -0.009537 -0.001000 -726.400024 Difference: 0.000000 -0.001000 0.000000 Collision with ground Overbounce is now pushing upward. No odd effects directly caused by overbounce Original velocity: 0.000371 -0.036805 0.000000 Overbounced velocity: 0.000371 -0.036805 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: -0.999949 -0.010067 0.000000 Overbounced velocity: -0.999949 -0.010067 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: 0.000000 0.000000 0.000000 Overbounced velocity: 0.000000 0.000000 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: 0.000371 -0.036805 0.000000 Overbounced velocity: 0.000371 -0.036805 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: -0.999949 -0.010067 0.000000 Overbounced velocity: -0.999949 -0.010067 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: 0.000000 0.000000 0.000000 Overbounced velocity: 0.000000 0.000000 0.001000 Difference: 0.000000 0.000000 0.001000 Collision with ground -- client Original velocity: 0.001352 -0.069439 0.000000 Overbounced velocity: 0.001352 -0.069439 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: -0.999811 -0.019461 0.000000 Overbounced velocity: -0.999811 -0.019461 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: 0.000000 0.000000 0.000000 Overbounced velocity: 0.000000 0.000000 0.001000 Difference: 0.000000 0.000000 0.001000 Collision with ground -- server Original velocity: 0.001352 -0.069439 0.000000 Overbounced velocity: 0.001352 -0.069439 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: -0.999811 -0.019461 0.000000 Overbounced velocity: -0.999811 -0.019461 0.001000 Difference: 0.000000 0.000000 0.001000 Original velocity: 0.000000 0.000000 0.000000 Overbounced velocity: 0.000000 0.000000 0.001000 Difference: 0.000000 0.000000 0.001000 PM_WalkMove PM_ClipVelocity (pml.forward, pml.groundTrace.plane.normal, pml.forward, OVERCLIP ); PM_ClipVelocity (pml.right, pml.groundTrace.plane.normal, pml.right, OVERCLIP ); PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, pm->ps->velocity, OVERCLIP ); // don't do anything if standing still if (!pm->ps->velocity[0] && !pm->ps->velocity[1]) { return; } PM_StepSlideMove( qfalse ); PM_AirMove if ( pml.groundPlane ) { PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, pm->ps->velocity, OVERCLIP ); Crash land 2 1 Original velocity: 0.000709 -0.036800 0.000000 Overbounced velocity: 0.000709 -0.036800 0.001000 Normal: 0.000000 0.000000 1.000000 Original velocity: -0.999814 -0.019269 0.000000 Overbounced velocity: -0.999814 -0.019269 0.001000 Normal: 0.000000 0.000000 1.000000 Original velocity: 0.000000 0.000000 0.000000 Overbounced velocity: 0.000000 0.000000 0.001000 Normal: 0.000000 0.000000 1.000000 <-- This is the key. ^-- This is programmer (me) error. Start of pmove cycle In air PM_AirMove Detect crash landing On ground End of pmove cycle Start of pmove cycle On ground PM_WalkMove Jump? Jumping will call PM_AirMove and then exit. No overbounce will occur. Set vertical velocity to zero. PM_ClipVelocity (pml.forward, pml.groundTrace.plane.normal, pml.forward, OVERCLIP ); PM_ClipVelocity (pml.right, pml.groundTrace.plane.normal, pml.right, OVERCLIP ); PM_ClipVelocity In air End of pmove cycle The first two PM_ClipVelocity functions don't do anything. They are supposed to do something with wishvel, but since no keys are pressed (usually), we can ignore these instances. The last one, if OVERCLIP is set to 1.0f, overbounce does not occur. Resulting velocity is {0, 0, 0.001}. This is then normalized to {0, 0, 1.0}. The original velocity is then applied to it. THE CODE { vec3_t vel; // Save the velocity for later. vel = VectorLength(pm->ps->velocity); // Set the vertical velocity to 0.001 if we impact the surface. PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal, pm->ps->velocity, OVERCLIP ); // Normalize the velocity. If the horizontal velocity is small, then the vertical velocity will be amplified. VectorNormalize(pm->ps->velocity); VectorScale(pm->ps->velocity, vel, pm->ps->velocity); }