Change analog mouse to apply turning buttons, because aa.

This commit is contained in:
toasterbabe 2017-04-14 21:01:45 +01:00
parent 85b71aa685
commit 30b10b05d3

View file

@ -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));