mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Change Next/Previous Weapon button handling for Duke and RR games.
- Resolves inability to change weapons under SDL-based environments as reported at https://forum.zdoom.org/viewtopic.php?f=340&t=67232#p1142970
This commit is contained in:
parent
e777225093
commit
02d436f802
2 changed files with 16 additions and 4 deletions
|
@ -3202,10 +3202,16 @@ void P_GetInput(int const playerNum)
|
|||
weaponSelection = 14;
|
||||
else if (buttonMap.ButtonDown(gamefunc_Alt_Weapon))
|
||||
weaponSelection = 13;
|
||||
else if (buttonMap.ButtonDown(gamefunc_Next_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel > 0))
|
||||
else if (buttonMap.ButtonPressed(gamefunc_Next_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel > 0))
|
||||
{
|
||||
weaponSelection = 12;
|
||||
else if (buttonMap.ButtonDown(gamefunc_Previous_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0))
|
||||
buttonMap.ClearButton(gamefunc_Next_Weapon);
|
||||
}
|
||||
else if (buttonMap.ButtonPressed(gamefunc_Previous_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0))
|
||||
{
|
||||
weaponSelection = 11;
|
||||
buttonMap.ClearButton(gamefunc_Previous_Weapon);
|
||||
}
|
||||
else if (weaponSelection == gamefunc_Weapon_1-1)
|
||||
weaponSelection = 0;
|
||||
|
||||
|
|
|
@ -3383,10 +3383,16 @@ void P_GetInput(int const playerNum)
|
|||
weaponSelection = 14;
|
||||
else if (buttonMap.ButtonDown(gamefunc_Alt_Weapon))
|
||||
weaponSelection = 13;
|
||||
else if (buttonMap.ButtonDown(gamefunc_Next_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel > 0))
|
||||
else if (buttonMap.ButtonPressed(gamefunc_Next_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel > 0))
|
||||
{
|
||||
weaponSelection = 12;
|
||||
else if (buttonMap.ButtonDown(gamefunc_Previous_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0))
|
||||
buttonMap.ClearButton(gamefunc_Next_Weapon);
|
||||
}
|
||||
else if (buttonMap.ButtonPressed(gamefunc_Previous_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0))
|
||||
{
|
||||
weaponSelection = 11;
|
||||
buttonMap.ClearButton(gamefunc_Previous_Weapon);
|
||||
}
|
||||
else if (weaponSelection == gamefunc_Weapon_1-1)
|
||||
weaponSelection = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue