mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix shared loadouts loadout index being null
Forgot to change that one getVar
This commit is contained in:
@ -9,8 +9,22 @@ private _contentPanelCtrl = _display displayCtrl IDC_contentPanel;
|
||||
private _curSel = lnbCurSelRow _contentPanelCtrl;
|
||||
private _loadoutName = _contentPanelCtrl lnbText [_curSel, 1];
|
||||
|
||||
private _loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_curSel, 0]) + (_contentPanelCtrl lnbText [_curSel, 1]))) select 2;
|
||||
GVAR(center) setUnitLoadout [[_contentPanelCtrl getVariable _loadoutName + QGVAR(currentLoadoutsTab), _loadout] select (GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts), true];
|
||||
private _loadout = switch GVAR(currentLoadoutsTab) do {
|
||||
|
||||
case IDC_buttonMyLoadouts;
|
||||
case IDC_buttonDefaultLoadouts:{
|
||||
_contentPanelCtrl getVariable _loadoutName + QGVAR(currentLoadoutsTab)
|
||||
};
|
||||
|
||||
case IDC_buttonSharedLoadouts:{
|
||||
(GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_curSel, 0]) + (_contentPanelCtrl lnbText [_curSel, 1]))) select 2
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("loadout load", _loadout);
|
||||
|
||||
|
||||
GVAR(center) setUnitLoadout [_loadout, true];
|
||||
|
||||
GVAR(currentItems) = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", [], [], [], [], [], []];
|
||||
for "_index" from 0 to 15 do {
|
||||
|
@ -12,7 +12,7 @@ private _profileName = profileName; // GVAR(center) could be a remote unit
|
||||
private _loadoutVar = _profileName + _loadoutName;
|
||||
|
||||
private _loadoutIndex = GVAR(sharedLoadoutsVars) find _loadoutVar;
|
||||
private _loadoutData = _contentPanelCtrl getVariable _loadoutName;
|
||||
private _loadoutData = _contentPanelCtrl getVariable (_loadoutName + QGVAR(currentLoadoutsTab));
|
||||
|
||||
if (_loadoutIndex > -1) then {
|
||||
GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, nil, true];
|
||||
|
@ -75,7 +75,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
||||
{
|
||||
_x params ["_playerName", "_loadoutName", "_loadoutData"];
|
||||
|
||||
if !((allPlayers apply {name _x}) find _playerName > -1) then {
|
||||
if ((allPlayers apply {name _x}) find _playerName == -1) then {
|
||||
|
||||
private _loadoutVar = _playerName + _loadoutName;
|
||||
GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, nil, true];
|
||||
|
@ -15,7 +15,7 @@
|
||||
* [LOGIC, nil, true] call ace_zeus_fnc_bi_moduleArsenal
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
Reference in New Issue
Block a user