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.
This commit is contained in:
Mitchell Richters 2020-05-29 11:28:41 +10:00 committed by Christoph Oelckers
parent e1e05eeaa7
commit c05eb6dbb6

View file

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