ref: f658b7a17a56abcb6836fa608649fd4a368e0194
parent: d73ad9079ea98c00f76c0a8caa0a6b92d843b076
author: LTCHIPS <ltchips994@gmail.com>
date: Mon Jul 27 11:47:35 EDT 2020
Changed sensitivity_scalar to int from int[], increased max mouse sensitivity
--- a/src/rt_menu.c
+++ b/src/rt_menu.c
@@ -4631,8 +4631,8 @@
)
{
- SliderMenu( &mouseadjustment, 11, 0, 21, 81, 240, 1, "block1", NULL,
- "Mouse Sensitivity", "Slow", "Fast" );
+ SliderMenu( &mouseadjustment, 30, 0, 21, 81, 240, 1, "block1", NULL,
+ "Mouse Sensitivity", "Slow", "Stupid Fast" );
}
//******************************************************************************
--- a/src/rt_playr.c
+++ b/src/rt_playr.c
@@ -2174,10 +2174,7 @@
#define MOUSE_TZ_INPUT_SCALE 20
int mouse_ry_input_scale = 5000;
-int sensitivity_scalar[15] =
-{
- 0,1,2,3,4,5,6,8,11,13,15,18,12,13,14
-};
+int sensitivity_scalar = 5;
//#define MOUSE_RY_SCALE 65535
//#define MOUSE_TZ_SCALE 65535
#define MAXMOUSETURN 7000000
@@ -2216,6 +2213,7 @@
MX = 0;
MY = 0;
+ sensitivity_scalar = mouseadjustment;
if ((abs (mouseymove)) >= threshold)
{ //
@@ -2226,7 +2224,7 @@
playertype * pstate;
pstate=&PLAYERSTATE[consoleplayer];
//if (pstate->horizon > 512){
- pstate->horizon -= Ys * (2*sensitivity_scalar[mouseadjustment]);
+ pstate->horizon -= Ys * (2*sensitivity_scalar);
//}
}
else if (MY < 0) {
@@ -2233,7 +2231,7 @@
playertype * pstate;
pstate=&PLAYERSTATE[consoleplayer];
//SetTextMode ( );
- pstate->horizon += Ys * (2*sensitivity_scalar[mouseadjustment]);
+ pstate->horizon += Ys * (2*sensitivity_scalar);
//buttonpoll[ bt_horizonup ] = true;
}
MY = 0;
@@ -2255,7 +2253,7 @@
{
//MX = -MOUSE_RY_INPUT_SCALE*mousexmove;
MX = -mouse_ry_input_scale*mousexmove;
- MX += FixedMul(MX,sensitivity_scalar[mouseadjustment]*MOUSE_RY_SENSITIVITY_SCALE);
+ MX += FixedMul(MX,sensitivity_scalar*MOUSE_RY_SENSITIVITY_SCALE);
// if (abs(MX) > MAXMOUSETURN)
// MX = MAXMOUSETURN*SGN(MX);
if (usemouselook == true) {