mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 09:42:57 +00:00
Change analog mouse to apply turning buttons, because aa.
This commit is contained in:
parent
85b71aa685
commit
30b10b05d3
1 changed files with 22 additions and 3 deletions
25
src/g_game.c
25
src/g_game.c
|
@ -1185,10 +1185,19 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
||||||
if (!mouseaiming && cv_mousemove.value)
|
if (!mouseaiming && cv_mousemove.value)
|
||||||
forward += mousey;
|
forward += mousey;
|
||||||
|
|
||||||
if (cv_analog.value ||
|
if ((!demoplayback && (player->climbing
|
||||||
(!demoplayback && (player->climbing
|
|
||||||
|| (player->pflags & PF_SLIDING)))) // Analog for mouse
|
|| (player->pflags & PF_SLIDING)))) // Analog for mouse
|
||||||
side += mousex*2;
|
side += mousex*2;
|
||||||
|
else if (cv_analog.value)
|
||||||
|
{
|
||||||
|
if (mousex)
|
||||||
|
{
|
||||||
|
if (mousex > 0)
|
||||||
|
cmd->buttons |= BT_CAMRIGHT;
|
||||||
|
else
|
||||||
|
cmd->buttons |= BT_CAMLEFT;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*8));
|
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*8));
|
||||||
|
|
||||||
|
@ -1471,9 +1480,19 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
||||||
if (!mouseaiming && cv_mousemove2.value)
|
if (!mouseaiming && cv_mousemove2.value)
|
||||||
forward += mouse2y;
|
forward += mouse2y;
|
||||||
|
|
||||||
if (cv_analog2.value || player->climbing
|
if (player->climbing
|
||||||
|| (player->pflags & PF_SLIDING)) // Analog for mouse
|
|| (player->pflags & PF_SLIDING)) // Analog for mouse
|
||||||
side += mouse2x*2;
|
side += mouse2x*2;
|
||||||
|
else if (cv_analog2.value)
|
||||||
|
{
|
||||||
|
if (mouse2x)
|
||||||
|
{
|
||||||
|
if (mouse2x > 0)
|
||||||
|
cmd->buttons |= BT_CAMRIGHT;
|
||||||
|
else
|
||||||
|
cmd->buttons |= BT_CAMLEFT;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
cmd->angleturn = (INT16)(cmd->angleturn - (mouse2x*8));
|
cmd->angleturn = (INT16)(cmd->angleturn - (mouse2x*8));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue