This article is one I wrote in 2004. Original is at http://articles.thewavelength.net/473/

Fixing bouncy crouch code is one thing that I feel every mod should do before they release. It prevents the fact that players can tap their crouch code and bounce their player up and down rapidly, moving their hit boxes around causing them to be harder to hit in critical areas like the head. Here is how you fix that:

Open pm_shared.c
Find the function PM_UnDuck()
Then find this code:

if ( pmove->onground != -1 )
{
    for ( i = 0; i < 3; i++ )
    {
        newOrigin[i] += ( pmove->player_mins[1][i] – pmove->player_mins[0][i] );
    }
}

Change that code block to look like this:

if ( pmove->onground != -1 && pmove->flags & FL_DUCKING && pmove->bInDuck == false)
{
    for ( i = 0; i < 3; i++ )
    {
        newOrigin[i] += ( pmove->player_mins[1][i] – pmove->player_mins[0][i] );
    }
}

Remember to compile both client and server dlls before you test this out!