I opened up the "mp" project and searched for "knock", and got only one result: Line 2737 in pm_shared.c. Here's the entire section of code that has it:
Code:
void PM_CheckFalling( void )
{
if ( pmove->onground != -1 &&
!pmove->dead &&
pmove->flFallVelocity >= PLAYER_FALL_PUNCH_THRESHHOLD )
{
float fvol = 0.5;
if ( pmove->waterlevel > 0 )
{
}
else if ( pmove->flFallVelocity > PLAYER_MAX_SAFE_FALL_SPEED )
{
// NOTE: In the original game dll , there were no breaks after these cases, causing the first one to
// cascade into the second
//switch ( RandomLong(0,1) )
//{
//case 0:
//pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain2.wav", 1, ATTN_NORM, 0, PITCH_NORM );
//break;
//case 1:
pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain3.wav", 1, ATTN_NORM, 0, PITCH_NORM );
// break;
//}
fvol = 1.0;
}
else if ( pmove->flFallVelocity > PLAYER_MAX_SAFE_FALL_SPEED / 2 )
{
qboolean tfc = false;
tfc = atoi( pmove->PM_Info_ValueForKey( pmove->physinfo, "tfc" ) ) == 1 ? true : false;
if ( tfc )
{
pmove->PM_PlaySound( CHAN_VOICE, "player/pl_fallpain3.wav", 1, ATTN_NORM, 0, PITCH_NORM );
}
fvol = 0.85;
}
else if ( pmove->flFallVelocity < PLAYER_MIN_BOUNCE_SPEED )
{
fvol = 0;
}
if ( fvol > 0.0 )
{
// Play landing step right away
pmove->flTimeStepSound = 0;
PM_UpdateStepSound();
// play step sound for current texture
PM_PlayStepSound( PM_MapTextureTypeStepType( pmove->chtexturetype ), fvol );
// Knock the screen around a little bit, temporary effect
pmove->punchangle[ 2 ] = pmove->flFallVelocity * 0.013; // punch z axis
if ( pmove->punchangle[ 0 ] > 8 )
{
pmove->punchangle[ 0 ] = 8;
}
}
}
if ( pmove->onground != -1 )
{
pmove->flFallVelocity = 0;
}
}