thank you! its much slower than my sens, maybe the mouse has other dpi. dont know, dont care, went back to my settings with m_cpi 0
Does any chances that this part of code will be opened under GPL ? That's will be great. Thanks.
It shouldn't be too difficult to program.
The QL and ioquake source is already GPL, and all m_cpi does is some mathematical formulas.
The user provides the part of the equation that the software doesn't know about, that is the CPI.
Then just sens --> degrees/cm
accel --> cm/second.
Thanks for answer. For code developers it's not difficult, but I'm not a programmer, I'm just player. but...
I sync ioq3 repository from github, and tried to understand. So, can you tell me, what file(s) I need to modify ? I found 'cl_input.c' with CL_MouseMove() function. That's all ? I need to modify this function only ?
This is definitely beyond what I know at this point but it needs a cvar at least. It should be fairly straightforward to follow the same format as the other cvars.
Once a cvar is created have mousemove grab its info the same way it does sensitivity or mouseaccel.
Mousemove is doing this for example with the horizontal:
dg = M (B + (A(v))) dx
Where dx is counts, dg is degrees, A is mouseaccel, B is base sensitivity, M is m_yaw, and v is velocity.
v should be in counts/msec.
Part of that is here:
accelSensitivity = cl_sensitivity->value + rate * cl_mouseAccel->value;
rate * cl_mouseAccel->value gets evaluated first, if mouseaccel is 0 then nothing is added to the sens (sens + rate*0).
Evidence for this is with this cvar:
if ( rate && cl_showMouseRate->integer ) {
Com_Printf( "%f : %f\n", rate, accelSensitivity );
}
This is testing that A. the mouse is moving, and that B. cl_showmouserate is 1, in which case it prints two values, the first being the "velocity" and the other being the sensitivity. When cl_mouseaccel is 0, the second value remains constant despite changes to the first. That tells me that rate is the velocity, and "accelSensitivity" is _the_ sensitivity, it is just unaffected by velocity when cl_mouseaccel is 0.
To get degrees/cm in sens:
(Remember this is when m_cpi > 0, don't do this stuff otherwise.)
(Also, m_yaw must be 0.022 as stated in the original post of this thread.)
sens_in_degrees/cm / (m_cpi/2.54) = sens in degrees/mousecount.
Normally, sens * m_yaw is horizontal degrees/mouse count, but here we already have the answer to it. However this result will be multiplied by m_yaw later, so we need to divide it out. This is why m_yaw must be 0.022. Then we can feed it into the normal function accelSensitivity assignment where cl_sensitivity->value would normally go.
So make a new variable, sensmodified = [cl_sensitivity->value / (m_cpi/2.54)] / 0.022
To be given to accelSensitivity later.
To get cm/second in v:
I believe this is where "rate" is gathered:
rate = sqrt( mx * mx + my * my ) / (float)frame_msec;
Probably that should be left as it is to maintain the speed at which velocity is considered, but later when it comes to multiplying it with mouse accel we need to adjust it to be cm/second like this:
[(rate * 1000) / (m_cpi / 2.54)] = cm/s
So maybe something like:
rate2 = [(rate * 1000) / (m_cpi / 2.54)]
Now we can give both new variables to accelSensitivity:
accelSensitivity = sensmodified + rate2 * cl_mouseAccel->value;
mx *= accelSensitivity;
cl.viewangles[YAW] -= m_yaw->value * mx;
Just thinking aloud kinda and even if it is correct (the odds are against me) it might be an inelegant and/or severely inefficient way to do it. I know that division is supposed to be costly but maybe the compiler sees a way around that. Perhaps the extra math causes a significant latency, I don't know.
Hi, sry for my bad english!
I have the steelseries sensei raw with 1800cpi, and windows sense 4 without accel,
i must make in_mouse "2", m_cpi "720" and m_yaw "0.022"?
and sensitivity, mouseaccel ect. i would like?
... sorry if the question has been answered many times before, I can not speak English!![]()
Last edited by nosrepallik; 02-21-2013 at 02:29 AM.
///Mouse
m_cpi "720"
m_filter "1"
in_mouse "2"
cl_freelook "1"
sensitivity "6"
m_pitch ".022"
m_yaw ".022"
m_forward ".22"
m_side ".22"
cl_mouseAccel ".01"
cl_mouseAccelPower "2"
cl_mouseAccelDebug "0"
cl_mouseAccelOffset "0"
cl_mousesenscap "0"
cg_filter_angles ".1"
cg_zoomSensitivity "0"
Last edited by nosrepallik; 02-21-2013 at 05:41 AM.
Was 720 cpi the cpi of your previous mouse?