// if the player is looking far enough to either side, turn the feet to keep them within the extent of the aim matrix
m_flFootYawLast = m_flFootYaw;
m_flFootYaw = clamp( m_flFootYaw, -360.0f, 360.0f );
float flEyeFootDelta = AngleDiff( m_flEyeYaw, m_flFootYaw );
// narrow the available aim matrix width as speed increases
float flAimMatrixWidthRange = Lerp( clamp( m_flSpeedAsPortionOfWalkTopSpeed, 0.0f, 1.0f ), 1.0f, Lerp( m_flWalkToRunTransition, 0.8f, 0.5f ) );
if ( m_flAnimDuckAmount > 0.0f )
flAimMatrixWidthRange = Lerp( m_flAnimDuckAmount * clamp( m_flSpeedAsPortionOfCrouchTopSpeed, 0.0f, 1.0f ), flAimMatrixWidthRange, 0.5f );
float flTempYawMax = m_flAimYawMax * flAimMatrixWidthRange;
float flTempYawMin = m_flAimYawMin * flAimMatrixWidthRange;
if ( flEyeFootDelta > flTempYawMax )
m_flFootYaw = m_flEyeYaw - fabsf( flTempYawMax );
else if ( flEyeFootDelta < flTempYawMin )
m_flFootYaw = m_flEyeYaw + fabsf( flTempYawMin );
m_flFootYaw = AngleNormalize( m_flFootYaw );