if (!key_consoleactive && key_dest == key_game && !cl.csqc_wantsmousemove)
{
float modulatedsensitivity = sensitivity.value * cl.sensitivityscale;
- if (cl_prydoncursor.integer)
+ if (cl_prydoncursor.integer > 0)
{
// mouse interacting with the scene, mostly stationary view
V_StopPitchDrift();
{
vec3_t temp;
- if (!cl_prydoncursor.integer)
+ if (cl_prydoncursor.integer <= 0)
VectorClear(cl.cmd.cursor_screen);
/*
VectorSet(temp, cl.cmd.cursor_screen[2] * 1000000, (v_flipped.integer ? -1 : 1) * cl.cmd.cursor_screen[0] * -r_refdef.view.frustum_x * 1000000, cl.cmd.cursor_screen[1] * -r_refdef.view.frustum_y * 1000000);
Matrix4x4_Transform(&r_refdef.view.matrix, temp, cl.cmd.cursor_end);
// trace from view origin to the cursor
- cl.cmd.cursor_fraction = CL_SelectTraceLine(cl.cmd.cursor_start, cl.cmd.cursor_end, cl.cmd.cursor_impact, cl.cmd.cursor_normal, &cl.cmd.cursor_entitynumber, (chase_active.integer || cl.intermission) ? &cl.entities[cl.playerentity].render : NULL);
+ if (cl_prydoncursor_notrace.integer)
+ {
+ cl.cmd.cursor_fraction = 1.0f;
+ VectorCopy(cl.cmd.cursor_end, cl.cmd.cursor_impact);
+ VectorClear(cl.cmd.cursor_normal);
+ cl.cmd.cursor_entitynumber = 0;
+ }
+ else
+ cl.cmd.cursor_fraction = CL_SelectTraceLine(cl.cmd.cursor_start, cl.cmd.cursor_end, cl.cmd.cursor_impact, cl.cmd.cursor_normal, &cl.cmd.cursor_entitynumber, (chase_active.integer || cl.intermission) ? &cl.entities[cl.playerentity].render : NULL);
}
typedef enum waterlevel_e
if (in_button8.state & 3) bits |= 128;
if (in_use.state & 3) bits |= 256;
if (key_dest != key_game || key_consoleactive) bits |= 512;
- if (cl_prydoncursor.integer) bits |= 1024;
+ if (cl_prydoncursor.integer > 0) bits |= 1024;
if (in_button9.state & 3) bits |= 2048;
if (in_button10.state & 3) bits |= 4096;
if (in_button11.state & 3) bits |= 8192;
cvar_t qport = {0, "qport", "0", "identification key for playing on qw servers (allows you to maintain a connection to a quakeworld server even if your port changes)"};
cvar_t cl_prydoncursor = {0, "cl_prydoncursor", "0", "enables a mouse pointer which is able to click on entities in the world, useful for point and click mods, see PRYDON_CLIENTCURSOR extension in dpextensions.qc"};
+cvar_t cl_prydoncursor_notrace = {0, "cl_prydoncursor_notrace", "0", "disables traceline used in prydon cursor reporting to the game, saving some cpu time"};
cvar_t cl_deathnoviewmodel = {0, "cl_deathnoviewmodel", "1", "hides gun model when dead"};
Cvar_RegisterVariable(&cl_dlights_decaybrightness);
Cvar_RegisterVariable(&cl_prydoncursor);
+ Cvar_RegisterVariable(&cl_prydoncursor_notrace);
Cvar_RegisterVariable(&cl_deathnoviewmodel);
DrawQ_Pic((vid_conwidth.integer - pic->width * crosshair_size.value) * 0.5f, (vid_conheight.integer - pic->height * crosshair_size.value) * 0.5f, pic, pic->width * crosshair_size.value, pic->height * crosshair_size.value, crosshair_color_red.value, crosshair_color_green.value, crosshair_color_blue.value, crosshair_color_alpha.value, 0);
}
- if (cl_prydoncursor.integer)
+ if (cl_prydoncursor.integer > 0)
DrawQ_Pic((cl.cmd.cursor_screen[0] + 1) * 0.5 * vid_conwidth.integer, (cl.cmd.cursor_screen[1] + 1) * 0.5 * vid_conheight.integer, Draw_CachePic (va("gfx/prydoncursor%03i", cl_prydoncursor.integer)), 0, 0, 1, 1, 1, 1, 0);
}