From 5a35c4381b1559e5d12709f9692de4984f9c64e6 Mon Sep 17 00:00:00 2001 From: svdijk Date: Mon, 23 Dec 2013 14:45:20 +0100 Subject: heretic, hexen: Fix mouse (and joystick) weapon cycling. Implement this the same way it is implemented for doom and strife. --- src/heretic/g_game.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'src/heretic') diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index e9302e83..20858cb7 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -185,7 +185,7 @@ int turnheld; // for accelerative turning int lookheld; -boolean mousearray[4]; +boolean mousearray[MAX_MOUSE_BUTTONS + 1]; boolean *mousebuttons = &mousearray[1]; // allow [-1] int mousex, mousey; // mouse values are used once @@ -681,7 +681,51 @@ static void SetJoyButtons(unsigned int buttons_mask) for (i=0; idata1 & 1; - mousebuttons[1] = ev->data1 & 2; - mousebuttons[2] = ev->data1 & 4; + SetMouseButtons(ev->data1); mousex = ev->data2 * (mouseSensitivity + 5) / 10; mousey = ev->data3 * (mouseSensitivity + 5) / 10; return (true); // eat events -- cgit v1.2.3