From 769b359928def4744b0181e92a0391b47891359b Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 30 Nov 2019 06:10:54 +0000 Subject: [PATCH] SW: Add Alt Weapon Mode gamefunc and bind it to MOUSE3 by default git-svn-id: https://svn.eduke32.com/eduke32@8342 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/_functio.h # source/sw/src/function.h --- source/sw/src/game.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index c32d63e0e..213ef2113 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -4299,6 +4299,14 @@ void getinput(SW_PACKET *loc) SET(loc->bits, prev_weapon + 1); } + if (buttonMap.ButtonDown(gamefunc_Alt_Weapon_Mode)) + { + buttonMap.ClearButton(gamefunc_Alt_Weapon_Mode); + USERp u = User[pp->PlayerSprite]; + short const which_weapon = u->WeaponNum + 1; + SET(loc->bits, which_weapon); + } + inv_hotkey = 0; if (buttonMap.ButtonDown(gamefunc_Med_Kit)) inv_hotkey = INVENTORY_MEDKIT+1;