Gamepad support for weapon wheel.
This commit is contained in:
parent
e50d186a09
commit
fd179fe12a
2 changed files with 11 additions and 4 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1112 \cu(Sun 17 Mar 20:58:31 CET 2024)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1112 \cu(2024-03-17 20:58:31)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1113 \cu(Wed 20 Mar 13:43:38 CET 2024)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1113 \cu(2024-03-20 13:43:38)\c-";
|
||||
|
|
|
|||
|
|
@ -619,6 +619,11 @@ extend Class SWWMHandler
|
|||
else if ( cmd ~== "weapprev" ) WeapSel = -1;
|
||||
if ( wsel && (wsel.stage < 2) )
|
||||
{
|
||||
// pov/dpad takes priority
|
||||
if ( (e.KeyScan == InputEvent.Key_JoyPOV1_Up) || (e.KeyScan == InputEvent.Key_Pad_DPad_Up) )
|
||||
WeapSel = -1;
|
||||
else if ( (e.KeyScan == InputEvent.Key_JoyPOV1_Down) || (e.KeyScan == InputEvent.Key_Pad_DPad_Down) )
|
||||
WeapSel = 1;
|
||||
if ( WeapSel == 1 )
|
||||
{
|
||||
wsel.WeapNext();
|
||||
|
|
@ -629,12 +634,14 @@ extend Class SWWMHandler
|
|||
wsel.WeapPrev();
|
||||
return true;
|
||||
}
|
||||
if ( cmd ~== "+attack" )
|
||||
// Joy1 should be the same thing as the A button (usually)
|
||||
if ( (e.KeyScan == InputEvent.Key_Joy1) || (e.KeyScan == InputEvent.Key_Pad_A) || (cmd ~== "+attack") )
|
||||
{
|
||||
wsel.WeapSel();
|
||||
return true;
|
||||
}
|
||||
if ( cmd ~== "+altattack" )
|
||||
// ditto for Joy2
|
||||
if ( (e.KeyScan == InputEvent.Key_Joy2) || (e.KeyScan == InputEvent.Key_Pad_B) || (cmd ~== "+altattack") )
|
||||
{
|
||||
wsel.WeapCancel();
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue