X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_input.c;h=18b4cfa99249d93cac72f3a514009f3d6a54e432;hb=477bbf25079605d31574c77e33171bfc357dc513;hp=b24d8ea186d46da73167eff56d8f14da4fa98281;hpb=9d4ddf105ffd42ee018373c54d9679594904c670;p=xonotic%2Fdarkplaces.git diff --git a/cl_input.c b/cl_input.c index b24d8ea1..18b4cfa9 100644 --- a/cl_input.c +++ b/cl_input.c @@ -56,8 +56,6 @@ kbutton_t in_button3, in_button4, in_button5, in_button6, in_button7, in_button8 int in_impulse; -extern cvar_t sys_ticrate; - void KeyDown (kbutton_t *b) { @@ -409,18 +407,18 @@ void CL_Move (void) { // strafing mode, all looking is movement V_StopPitchDrift(); - cl.cmd.sidemove += m_side.value * in_mouse_x * sensitivity.value * cl.viewzoom; + cl.cmd.sidemove += m_side.value * in_mouse_x * sensitivity.value; if (noclip_anglehack) - cl.cmd.upmove -= m_forward.value * in_mouse_y * sensitivity.value * cl.viewzoom; + cl.cmd.upmove -= m_forward.value * in_mouse_y * sensitivity.value; else - cl.cmd.forwardmove -= m_forward.value * in_mouse_y * sensitivity.value * cl.viewzoom; + cl.cmd.forwardmove -= m_forward.value * in_mouse_y * sensitivity.value; } else if ((in_mlook.state & 1) || freelook.integer) { // mouselook, lookstrafe causes turning to become strafing V_StopPitchDrift(); if (lookstrafe.integer) - cl.cmd.sidemove += m_side.value * in_mouse_x * sensitivity.value * cl.viewzoom; + cl.cmd.sidemove += m_side.value * in_mouse_x * sensitivity.value; else cl.viewangles[YAW] -= m_yaw.value * in_mouse_x * sensitivity.value * cl.viewzoom; cl.viewangles[PITCH] += m_pitch.value * in_mouse_y * sensitivity.value * cl.viewzoom; @@ -429,7 +427,7 @@ void CL_Move (void) { // non-mouselook, yaw turning and forward/back movement cl.viewangles[YAW] -= m_yaw.value * in_mouse_x * sensitivity.value * cl.viewzoom; - cl.cmd.forwardmove -= m_forward.value * in_mouse_y * sensitivity.value * cl.viewzoom; + cl.cmd.forwardmove -= m_forward.value * in_mouse_y * sensitivity.value; } } @@ -473,8 +471,8 @@ void CL_UpdatePrydonCursor(void) cl.cmd.cursor_screen[1] = bound(-1, cl.cmd.cursor_screen[1], 1); cl.cmd.cursor_screen[2] = 1; - scale[0] = -tan(r_refdef.fov_x * M_PI / 360.0); - scale[1] = -tan(r_refdef.fov_y * M_PI / 360.0); + scale[0] = -r_refdef.frustum_x; + scale[1] = -r_refdef.frustum_y; scale[2] = 1; // trace distance @@ -513,7 +511,7 @@ void CL_ClientMovement_Input(qboolean buttonjump, qboolean buttoncrouch) cl.movement_queue[cl.movement_numqueue++] = cl.movement_queue[i]; } // add to input queue if there is room - if (cl_movement.integer && cl.movement_numqueue < sizeof(cl.movement_queue)/sizeof(cl.movement_queue[0]) && cl.mtime[0] > cl.mtime[1]) + if (cl_movement.integer && cl.movement_numqueue < (int)(sizeof(cl.movement_queue)/sizeof(cl.movement_queue[0])) && cl.mtime[0] > cl.mtime[1]) { // add to input queue cl.movement_queue[cl.movement_numqueue].sequence = cl.movesequence; @@ -784,7 +782,7 @@ void CL_SendMove(void) int i; int bits; sizebuf_t buf; - qbyte data[128]; + unsigned char data[128]; #define MOVEAVERAGING 0 #if MOVEAVERAGING static float forwardmove, sidemove, upmove, total; // accumulation