diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 87f1bc12d..eac2b21bb 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -284,7 +284,7 @@ void CONFIG_SetDefaults( void ) MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum( mouseanalogdefaults[i] ); CONTROL_MapAnalogAxis( i, MouseAnalogueAxes[i], controldevice_mouse); } - CONTROL_SetMouseSensitivity(32768); + CONTROL_SetMouseSensitivity(DEFAULTMOUSESENSITIVITY); memset(JoystickFunctions, -1, sizeof(JoystickFunctions)); for (i=0; i> 15; */ - CONTROL_MouseAxes[0].analog = (x * CONTROL_MouseSensitivity>>8); - CONTROL_MouseAxes[1].analog = (y * CONTROL_MouseSensitivity>>6); + CONTROL_MouseAxes[0].analog = (x * (CONTROL_MouseSensitivity<<1)); + CONTROL_MouseAxes[1].analog = (y * (CONTROL_MouseSensitivity<<1))<<2; } int32 CONTROL_GetMouseSensitivity(void) { - return (CONTROL_MouseSensitivity - MINIMUMMOUSESENSITIVITY); + return (CONTROL_MouseSensitivity); } void CONTROL_SetMouseSensitivity(int32 newsensitivity) { - CONTROL_MouseSensitivity = newsensitivity + MINIMUMMOUSESENSITIVITY; + CONTROL_MouseSensitivity = newsensitivity; } boolean CONTROL_StartMouse(void) @@ -604,12 +604,12 @@ void CONTROL_ApplyAxis(int32 axis, ControlInfo *info, controldevice device) } switch (map[axis].analogmap) { - case analog_turning: info->dyaw += set[axis].analog; break; - case analog_strafing: info->dx += set[axis].analog; break; - case analog_lookingupanddown: info->dpitch += set[axis].analog; break; - case analog_elevation: info->dy += set[axis].analog; break; - case analog_rolling: info->droll += set[axis].analog; break; - case analog_moving: info->dz += set[axis].analog; break; + case analog_turning: info->dyaw = set[axis].analog; break; + case analog_strafing: info->dx = set[axis].analog; break; + case analog_lookingupanddown: info->dpitch = set[axis].analog; break; + case analog_elevation: info->dy = set[axis].analog; break; + case analog_rolling: info->droll = set[axis].analog; break; + case analog_moving: info->dz = set[axis].analog; break; default: break; } } @@ -706,7 +706,7 @@ void CONTROL_ButtonFunctionState( int32 *p1 ) p1[j] |= CONTROL_JoyButtonState[i]; } } - +/* void CONTROL_GetUserInput( UserInput *info ) { ControlInfo ci; @@ -792,7 +792,7 @@ void CONTROL_ClearUserInput( UserInput *info ) if (info->button0) CONTROL_UserInputCleared[1] = true; if (info->button1) CONTROL_UserInputCleared[2] = true; } - +*/ void CONTROL_ClearButton( int32 whichbutton ) { if (CONTROL_CheckRange( whichbutton )) return; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 15ced25d5..4ea8ecc42 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2870,9 +2870,9 @@ cheat_for_port_credits: { short sense; - sense = CONTROL_GetMouseSensitivity()>>10; - barsm(248,128,&sense,2,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7)); - CONTROL_SetMouseSensitivity( sense<<10 ); + sense = CONTROL_GetMouseSensitivity(); + barsm(248,128,&sense,1,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7)); + CONTROL_SetMouseSensitivity( sense ); } if (!ud.mouseaiming) modval(0,1,(int *)&myaimmode,1,probey == (MAXMOUSEBUTTONS-2)*2+2+1); diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 5d90a93cb..dac2d49fa 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -490,11 +490,11 @@ int osdcmd_cvar_set(const osdfuncparm_t *parm) int osdcmd_sensitivity(const osdfuncparm_t *parm) { if (parm->numparms != 1) { - OSD_Printf("sensitivity %d\n",CONTROL_GetMouseSensitivity()>>10); + OSD_Printf("sensitivity %d\n",CONTROL_GetMouseSensitivity()); return OSDCMD_OK; } - CONTROL_SetMouseSensitivity(atoi(parm->parms[0])<<10); - OSD_Printf("\n"); + CONTROL_SetMouseSensitivity(atoi(parm->parms[0])); + OSD_Printf("sensitivity %d\n",CONTROL_GetMouseSensitivity()); return OSDCMD_OK; } diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 6cdf6a305..03194bc3c 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2160,7 +2160,7 @@ void displayweapon(short snum) } - if( j < 7 || j > 12 ) + if( j < 6 || j > 12 ) myospal(weapon_xoffset+80-(p->look_ang>>1), looking_arc+250-gun_pos,KNEE,gs,o|4,pal); else myospal(weapon_xoffset+160-16-(p->look_ang>>1), @@ -2704,14 +2704,6 @@ void getinput(short snum) CONTROL_GetInput( &info ); - info.dx += lastinfo.dx; - info.dy += lastinfo.dy; -/* info.dz += lastinfo.dz; - info.dyaw += lastinfo.dyaw; */ - info.dpitch += lastinfo.dpitch; - info.droll += lastinfo.droll; - memset(&lastinfo.dx, 0, sizeof(lastinfo)); - if( (p->gm&MODE_MENU) || (p->gm&MODE_TYPE) || (ud.pause_on && !KB_KeyPressed(sc_Pause)) ) { loc.fvel = vel = 0;