Mouse aim fixes

git-svn-id: https://svn.eduke32.com/eduke32@123 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-29 06:06:30 +00:00
parent 7567925e87
commit 76af69d72d
3 changed files with 10 additions and 8 deletions

View file

@ -72,8 +72,8 @@ void CONTROL_GetMouseDelta(void)
*x = (*x * 32 * CONTROL_MouseSensitivity) >> 15;
*/
CONTROL_MouseAxes[0].analog = mulscale8(x, CONTROL_MouseSensitivity);
CONTROL_MouseAxes[1].analog = mulscale6(y, CONTROL_MouseSensitivity);
CONTROL_MouseAxes[0].analog = (x * CONTROL_MouseSensitivity>>8);
CONTROL_MouseAxes[1].analog = (y * CONTROL_MouseSensitivity>>6);
}
int32 CONTROL_GetMouseSensitivity(void)

View file

@ -2871,7 +2871,7 @@ cheat_for_port_credits:
{
short sense;
sense = CONTROL_GetMouseSensitivity()>>10;
barsm(248,128,&sense,4,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7));
barsm(248,128,&sense,2,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7));
CONTROL_SetMouseSensitivity( sense<<10 );
}

View file

@ -2706,7 +2706,7 @@ void getinput(short snum)
info.dx += lastinfo.dx;
info.dy += lastinfo.dy;
info.dz += lastinfo.dz;
/* info.dz += lastinfo.dz; */
info.dyaw += lastinfo.dyaw;
info.dpitch += lastinfo.dpitch;
info.droll += lastinfo.droll;
@ -2748,7 +2748,7 @@ void getinput(short snum)
}
if(BUTTON(gamefunc_Jump))
jump_input = 4;
jump_input = 2;
loc.bits = jump_input?1:0; //BUTTON(gamefunc_Jump);
loc.bits |= BUTTON(gamefunc_Crouch)<<1;
@ -2836,11 +2836,13 @@ void getinput(short snum)
if( myaimmode )
{
lastinfo.dz = info.dz % (314-128);
if(ud.mouseflip)
horiz -= info.dz/(314-128);
else horiz += info.dz/(314-128);
horiz = -(info.dz+lastinfo.dz)/(314-128);
else horiz = (info.dz+lastinfo.dz)/(314-128);
if(horiz > -1)
horiz++;
lastinfo.dz = (lastinfo.dz+info.dz) % (314-128);
info.dz = 0;
} else {
lastinfo.dz = info.dz % (1<<6);