V_StopPitchDrift ();
cl.viewangles[YAW] = ANGLEMOD(cl.viewangles[YAW]);
+ cl.viewangles[PITCH] = ANGLEMOD(cl.viewangles[PITCH]);
if (cl.viewangles[YAW] >= 180)
cl.viewangles[YAW] -= 360;
+ if (cl.viewangles[PITCH] >= 180)
+ cl.viewangles[PITCH] -= 360;
cl.viewangles[PITCH] = bound(in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value);
cl.viewangles[ROLL] = bound(-180, cl.viewangles[ROLL], 180);
}
cl.cmd.upmove *= cl_movespeedkey.value;
}
- in_mouse_x = 0;
- in_mouse_y = 0;
-
// allow mice or other external controllers to add to the move
IN_Move ();
- // ignore a mouse move if mouse was activated/deactivated this frame
- if (cl_ignoremousemoves)
- {
- cl_ignoremousemoves--;
- in_mouse_x = 0;
- in_mouse_y = 0;
- }
-
// apply m_filter if it is on
mx = in_mouse_x;
my = in_mouse_y;
old_mouse_x = mx;
old_mouse_y = my;
+ // ignore a mouse move if mouse was activated/deactivated this frame
+ if (cl_ignoremousemoves)
+ {
+ cl_ignoremousemoves--;
+ in_mouse_x = old_mouse_x = 0;
+ in_mouse_y = old_mouse_y = 0;
+ }
+
// if not in menu, apply mouse move to viewangles/movement
- if (!cl.csqc_wantsmousemove && in_client_mouse)
+ if (!key_consoleactive && key_dest == key_game && !cl.csqc_wantsmousemove)
{
float modulatedsensitivity = sensitivity.value * cl.sensitivityscale;
if (cl_prydoncursor.integer)
cl.cmd.forwardmove -= m_forward.value * in_mouse_y * modulatedsensitivity;
}
}
+ else // don't pitch drift when csqc is controlling the mouse
+ V_StopPitchDrift();
if(v_flipped.integer)
{
if (s->waterjumptime <= 0)
{
// water friction
- f = 1 - s->cmd.frametime * cl.movevars_waterfriction * s->waterlevel;
+ f = 1 - s->cmd.frametime * cl.movevars_waterfriction * (cls.protocol == PROTOCOL_QUAKEWORLD ? s->waterlevel : 1);
f = bound(0, f, 1);
VectorScale(s->velocity, f, s->velocity);
packettime = 0;
// always send if buttons changed or an impulse is pending
// even if it violates the rate limit!
- if (!cl_netimmediatebuttons.integer || (cl.movecmd[0].buttons == cl.movecmd[1].buttons && !cl.movecmd[0].impulse))
+ if (!cl.movecmd[0].impulse && (!cl_netimmediatebuttons.integer || cl.movecmd[0].buttons == cl.movecmd[1].buttons))
{
// don't choke the connection with packets (obey rate limit)
if ((cls.protocol == PROTOCOL_QUAKEWORLD || cls.signon == SIGNONS) && !NetConn_CanSend(cls.netcon) && !cl.islocalgame)