I noticed that /sensitivity directs to cl_sensitivity which is a client var. Hence a workaround I was using for a mod may be suitable for the engine.
It can be suitable for client use with a cl_zoomsensitivityfovthreshhold cvar making users able to set a threshold below which 'zooming' is considered to be the case.
So basically one can use
/zoomsensitivity to multiply sensitivity x float when zoomed
and
/cl_zoomsensitivityfovthreshhold to set the mod's normal fov
In R_SetupProjection(),
static float pfovX, norm_sens;
if (!pfovX) { //initially
pfovX = dest->fovX;
norm_sens = cl_sensitivity->value;
}
if (pfovX != dest->fovX) { // did it change zooming state?
pfovX = dest->fovX; // save the current zooming state
if (pfovX >= cl_zoomsensitivityfovthreshhold->integer) {
cl_sensitivity->value = norm_sens; //fov normal, stay normal sensitivity
} else { //we're zoomed
cl_sensitivity->value = norm_sens * cl_zoomsensitivity->value; // we zoomed, multiply it by zoomsensitivity
}
}
I know know, it may considered workaround-ish but since sensitivity is a client var..
I noticed that /sensitivity directs to cl_sensitivity which is a client var. Hence a workaround I was using for a mod may be suitable for the engine. It can be suitable for client use with a cl_zoomsensitivityfovthreshhold cvar making users able to set a threshold below which 'zooming' is considered to be the case. So basically one can use /zoomsensitivity to multiply sensitivity x float when zoomed and /cl_zoomsensitivityfovthreshhold to set the mod's normal fov In R_SetupProjection(), static float pfovX, norm_sens; if (!pfovX) { //initially pfovX = dest->fovX; norm_sens = cl_sensitivity->value; } if (pfovX != dest->fovX) { // did it change zooming state? pfovX = dest->fovX; // save the current zooming state if (pfovX >= cl_zoomsensitivityfovthreshhold->integer) { cl_sensitivity->value = norm_sens; //fov normal, stay normal sensitivity } else { //we're zoomed cl_sensitivity->value = norm_sens * cl_zoomsensitivity->value; // we zoomed, multiply it by zoomsensitivity } } I know know, it may considered workaround-ish but since sensitivity is a client var..