engine/EngineClientView.c
/*	Moves the client pitch angle towards cl.idealpitch sent by the server.

	If the user is adjusting pitch manually, either with lookup/lookdown,
	mlook and mouse, or klook and keyboard, pitch drifting is constantly stopped.

	Drifting is enabled when the center view key is hit, mlook is released and
	lookspring is non 0, or when
*/
Moves the client pitch angle towards cl.idealpitch sent by the server.
If the user is adjusting pitch manually, either with lookup/lookdown,
mlook and mouse, or klook and keyboard, pitch drifting is constantly stopped.

Drifting is enabled when the center view key is hit, mlook is released and
lookspring is non 0, or when
Moves the client pitch angle towards cl . idealpitch sent by the server . If the user is adjusting pitch manually either with lookup / lookdown mlook and mouse or klook and keyboard pitch drifting is constantly stopped . Drifting is enabled when the center view key is hit mlook is released and lookspring is non 0 or when
void V_DriftPitch (void)
{
	float		delta, move;
	if (noclip_anglehack || !cl.bIsOnGround || cls.demoplayback )
	{
		cl.driftmove = 0;
		cl.pitchvel = 0;
		return;
	}
	if(cl.bNoDrift)
	{
		if ( fabs(cl.cmd.forwardmove) < cl_forwardspeed.value)
			cl.driftmove = 0;
		else
			cl.driftmove += host_frametime;
		if ( cl.driftmove > v_centermove.value)
			V_StartPitchDrift ();
		return;
	}
	delta = cl.idealpitch - cl.viewangles[PITCH];
	if(!delta)
	{
		cl.pitchvel = 0;
		return;
	}
	move = host_frametime * cl.pitchvel;
	cl.pitchvel += host_frametime * v_centerspeed.value;
	if (delta > 0)
	{
		if (move > delta)
		{
			cl.pitchvel = 0;
			move = delta;
		}
		cl.viewangles[PITCH] += move;
	}
	else if (delta < 0)
	{
		if (move > -delta)
		{
			cl.pitchvel = 0;
			move = -delta;
		}
		cl.viewangles[PITCH] -= move;
	}
}
void V_DriftPitch ( void ) { float delta , move ; if ( noclip_anglehack || ! cl . bIsOnGround || cls . demoplayback ) { cl . driftmove = 0 ; cl . pitchvel = 0 ; return ; } if ( cl . bNoDrift ) { if ( fabs ( cl . cmd . forwardmove ) < cl_forwardspeed . value ) cl . driftmove = 0 ; else cl . driftmove += host_frametime ; if ( cl . driftmove > v_centermove . value ) V_StartPitchDrift ( ) ; return ; } delta = cl . idealpitch - cl . viewangles [ PITCH ] ; if ( ! delta ) { cl . pitchvel = 0 ; return ; } move = host_frametime * cl . pitchvel ; cl . pitchvel += host_frametime * v_centerspeed . value ; if ( delta > 0 ) { if ( move > delta ) { cl . pitchvel = 0 ; move = delta ; } cl . viewangles [ PITCH ] += move ; } else if ( delta < 0 ) { if ( move > - delta ) { cl . pitchvel = 0 ; move = - delta ; } cl . viewangles [ PITCH ] -= move ; } }
Moves the client pitch angle towards cl.idealpitch sent by the server.
Moves the client pitch angle towards cl . idealpitch sent by the server .
//FIXME: noclip_anglehack is set on the server, so in a nonlocal game this won't work. // Don't count small mouse motion //Con_Printf ("move: %f (%f)\n", move, host_frametime);