mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 01:11:15 +00:00
Fix how analog axis values are used by the game code, part 2: aiming.
Mouse movement is no longer funneled through analog axis handling. git-svn-id: https://svn.eduke32.com/eduke32@7947 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f1e67616a9
commit
c40a4b26ff
4 changed files with 25 additions and 22 deletions
|
@ -105,7 +105,7 @@ void CONTROL_FreeMouseBind(int i)
|
|||
BIND(CONTROL_KeyBinds[MAXBOUNDKEYS + i], NULL, 0, NULL);
|
||||
}
|
||||
|
||||
static void CONTROL_GetMouseDelta(void)
|
||||
static void CONTROL_GetMouseDelta(ControlInfo * info)
|
||||
{
|
||||
vec2_t input;
|
||||
mouseReadPos(&input.x, &input.y);
|
||||
|
@ -119,8 +119,8 @@ static void CONTROL_GetMouseDelta(void)
|
|||
last = input;
|
||||
}
|
||||
|
||||
CONTROL_MouseAxes[0].analog = Blrintf(finput.x * 4.f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = Blrintf(finput.y * 4.f * CONTROL_MouseSensitivity);
|
||||
info->mousex = Blrintf(finput.x * 4.f * CONTROL_MouseSensitivity);
|
||||
info->mousey = Blrintf(finput.y * 4.f * CONTROL_MouseSensitivity);
|
||||
}
|
||||
|
||||
static int32_t CONTROL_GetTime(void)
|
||||
|
@ -618,7 +618,7 @@ static void CONTROL_PollDevices(ControlInfo *info)
|
|||
Bmemcpy(CONTROL_LastMouseAxes, CONTROL_MouseAxes, sizeof(CONTROL_MouseAxes));
|
||||
memset(CONTROL_MouseAxes, 0, sizeof(CONTROL_MouseAxes));
|
||||
|
||||
CONTROL_GetMouseDelta();
|
||||
CONTROL_GetMouseDelta(info);
|
||||
for (int i=MAXMOUSEAXES-1; i>=0; i--)
|
||||
{
|
||||
CONTROL_DigitizeAxis(i, controldevice_mouse);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue