shithub: choc

Download patch

ref: d08dc2b991bff9259ca55fe1cb4d04e00b410a5a
parent: 964507f8014938dcae18d42b605c058edf906799
author: Michael Day <[email protected]>
date: Thu Apr 21 05:15:37 EDT 2022

Hexen: Add mouse inventory buttons

Co-authored-by: kraflab <[email protected]>

--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -817,6 +817,14 @@
             {
                 next_weapon = 1;
             }
+            else if (i == mousebinvleft)
+            {
+                InventoryMoveLeft();
+            }
+            else if (i == mousebinvright)
+            {
+                InventoryMoveRight();
+            }
         }
 
         mousebuttons[i] = button_on;
--- a/src/setup/mouse.c
+++ b/src/setup/mouse.c
@@ -109,7 +109,7 @@
     AddMouseControl(buttons_table, "Next weapon", &mousebnextweapon);
     AddMouseControl(buttons_table, "Run", &mousebspeed);
     
-    if (gamemission == heretic)
+    if (gamemission == heretic || gamemission == hexen)
     {
       AddMouseControl(buttons_table, "Inventory left", &mousebinvleft);
       AddMouseControl(buttons_table, "Inventory right", &mousebinvright);