From c05eb6dbb6a9d7709c4c6946ed5d818702e8f232 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 29 May 2020 11:28:41 +1000 Subject: [PATCH] Blood: Fix issues with weapon not switching properly if cycling the weapons too quickly. - This means that while weapons can't be changed mid-animation, they switch consistently. I feel they animate quick enough, anyway. --- source/blood/src/controls.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index 64fd25ae0..f86948cc6 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -170,16 +170,19 @@ void ctrlGetInput(void) cl_crosshair = !cl_crosshair; } - if (buttonMap.ButtonPressed(gamefunc_Next_Weapon)) + if (gPlayer[myconnectindex].nextWeapon == 0) { - buttonMap.ClearButton(gamefunc_Next_Weapon); - gInput.keyFlags.nextWeapon = 1; - } + if (buttonMap.ButtonPressed(gamefunc_Next_Weapon)) + { + buttonMap.ClearButton(gamefunc_Next_Weapon); + gInput.keyFlags.nextWeapon = 1; + } - if (buttonMap.ButtonPressed(gamefunc_Previous_Weapon)) - { - buttonMap.ClearButton(gamefunc_Previous_Weapon); - gInput.keyFlags.prevWeapon = 1; + if (buttonMap.ButtonPressed(gamefunc_Previous_Weapon)) + { + buttonMap.ClearButton(gamefunc_Previous_Weapon); + gInput.keyFlags.prevWeapon = 1; + } } if (buttonMap.ButtonDown(gamefunc_Show_Opponents_Weapon))