Some general info
Bouncing is possible via a combination of PM_ProjectVelocity and PM_StepSlideMove. The latter function is needed for stairs and little elevations on the ground so the player doesn’t stop at every brush that is 1 unit heigher than the plane he is walking on. It basically lifts the player up if the brush he walks against is lower or equal the height thats set with the jump_stepSize dvar.
Fun Fact: CoD2 did not include PM_ProjectVelocity and used PM_ClipVelocity in its place. Hooking the call to PM_ClipVelocity and instead calling your own version of PM_ProjectVelocity will enable bouncing just like it is in CoD4.
Bouncing in Modern Warfare 2
The Bouncefix that was first introduced in Modern Warfare 2 is just one check on a variable called jumping right were it decides if PM_StepSlideMove should return early or try to further clip/project the players origin/velocity. The jumping variable was also set in CoD4’s PM_StepSlideMove but not used at that location.
This snippet shows where jumping is set for both games:
Part of PM_StepSlideMove - same for cod4 / mw2
Here you can see the change that prevents bouncing on MW2:
Part of MW2's PM_StepSlideMove