Skip to content

Commit

Permalink
Fix editing covert action soldier loadouts with a controller
Browse files Browse the repository at this point in the history
Full credit to this fix for kdm2k6 on issue
#1035
  • Loading branch information
araujorm committed May 11, 2023
1 parent c0eb58c commit b2bae0e
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ simulated function RefreshNavigation()
//bsg-jneal (3.10.17): add edit loadout navhelp if on an editable soldier
if( `ISCONTROLLERACTIVE && bIsSelectingSlots && SlotContainer.ActionSlots.Length > 0)
{
if( SlotContainer.ActionSlots[Navigator.SelectedIndex].CanEditLoadout() )
/// HL-Docs: ref:Bugfixes; issue:1035
/// Use `SlotContainer.Navigator.SelectedIndex` instead of `Navigator.SelectedIndex` to allow controller users editing all soldiers' loadouts.
if( SlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].CanEditLoadout() )
{
NavHelp.AddLeftHelp(class'UICovertActionStaffSlot'.default.m_strEditLoadout, class'UIUtilities_Input'.static.GetGamepadIconPrefix() $ class'UIUtilities_Input'.const.ICON_Y_TRIANGLE);
}
Expand Down Expand Up @@ -1022,9 +1024,13 @@ function EditSoldierLoadout()
// only edit loadout if action slot allows
if(bIsSelectingSlots && SlotContainer.ActionSlots.Length > 0)
{
if( SlotContainer.ActionSlots[Navigator.SelectedIndex].CanEditLoadout() )
/// HL-Docs: ref:Bugfixes; issue:1035
/// Use `SlotContainer.Navigator.SelectedIndex` instead of `Navigator.SelectedIndex` to allow controller users editing all soldiers' loadouts.
if( SlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].CanEditLoadout() )
{
SlotContainer.ActionSlots[Navigator.SelectedIndex].HandleClick("theButton2");
/// HL-Docs: ref:Bugfixes; issue:1035
/// Use `SlotContainer.Navigator.SelectedIndex` instead of `Navigator.SelectedIndex` to allow controller users editing all soldiers' loadouts.
SlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].HandleClick("theButton2");
}
}
}
Expand Down

0 comments on commit b2bae0e

Please sign in to comment.