mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Mouse aim fixes
git-svn-id: https://svn.eduke32.com/eduke32@123 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7567925e87
commit
76af69d72d
3 changed files with 10 additions and 8 deletions
|
@ -72,8 +72,8 @@ void CONTROL_GetMouseDelta(void)
|
||||||
*x = (*x * 32 * CONTROL_MouseSensitivity) >> 15;
|
*x = (*x * 32 * CONTROL_MouseSensitivity) >> 15;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CONTROL_MouseAxes[0].analog = mulscale8(x, CONTROL_MouseSensitivity);
|
CONTROL_MouseAxes[0].analog = (x * CONTROL_MouseSensitivity>>8);
|
||||||
CONTROL_MouseAxes[1].analog = mulscale6(y, CONTROL_MouseSensitivity);
|
CONTROL_MouseAxes[1].analog = (y * CONTROL_MouseSensitivity>>6);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 CONTROL_GetMouseSensitivity(void)
|
int32 CONTROL_GetMouseSensitivity(void)
|
||||||
|
|
|
@ -2871,7 +2871,7 @@ cheat_for_port_credits:
|
||||||
{
|
{
|
||||||
short sense;
|
short sense;
|
||||||
sense = CONTROL_GetMouseSensitivity()>>10;
|
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 );
|
CONTROL_SetMouseSensitivity( sense<<10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2706,7 +2706,7 @@ void getinput(short snum)
|
||||||
|
|
||||||
info.dx += lastinfo.dx;
|
info.dx += lastinfo.dx;
|
||||||
info.dy += lastinfo.dy;
|
info.dy += lastinfo.dy;
|
||||||
info.dz += lastinfo.dz;
|
/* info.dz += lastinfo.dz; */
|
||||||
info.dyaw += lastinfo.dyaw;
|
info.dyaw += lastinfo.dyaw;
|
||||||
info.dpitch += lastinfo.dpitch;
|
info.dpitch += lastinfo.dpitch;
|
||||||
info.droll += lastinfo.droll;
|
info.droll += lastinfo.droll;
|
||||||
|
@ -2748,7 +2748,7 @@ void getinput(short snum)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(BUTTON(gamefunc_Jump))
|
if(BUTTON(gamefunc_Jump))
|
||||||
jump_input = 4;
|
jump_input = 2;
|
||||||
|
|
||||||
loc.bits = jump_input?1:0; //BUTTON(gamefunc_Jump);
|
loc.bits = jump_input?1:0; //BUTTON(gamefunc_Jump);
|
||||||
loc.bits |= BUTTON(gamefunc_Crouch)<<1;
|
loc.bits |= BUTTON(gamefunc_Crouch)<<1;
|
||||||
|
@ -2836,11 +2836,13 @@ void getinput(short snum)
|
||||||
|
|
||||||
if( myaimmode )
|
if( myaimmode )
|
||||||
{
|
{
|
||||||
lastinfo.dz = info.dz % (314-128);
|
|
||||||
if(ud.mouseflip)
|
if(ud.mouseflip)
|
||||||
horiz -= info.dz/(314-128);
|
horiz = -(info.dz+lastinfo.dz)/(314-128);
|
||||||
else horiz += info.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;
|
info.dz = 0;
|
||||||
} else {
|
} else {
|
||||||
lastinfo.dz = info.dz % (1<<6);
|
lastinfo.dz = info.dz % (1<<6);
|
||||||
|
|
Loading…
Reference in a new issue