Fix filling loadouts list during preInit (#9794)

This commit is contained in:
Grim 2024-02-11 20:21:29 -03:00 committed by GitHub
parent f3f9d18f55
commit b2849aaa29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
_contentPanelCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)]; _contentPanelCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)];
_contentPanelCtrl lnbSetValue [[_newRow, 0], 1]; _contentPanelCtrl lnbSetValue [[_newRow, 0], 1];
}; };
} forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, LOADOUTS_PER_FRAME]); } forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, [LOADOUTS_PER_FRAME, count _loadouts] select is3DEN]);
} else { } else {
private _allPlayerNames = allPlayers apply {name _x}; private _allPlayerNames = allPlayers apply {name _x};
private _loadouts = _sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x}; private _loadouts = _sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x};
@ -153,10 +153,10 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
}; };
}; };
}; };
} forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, LOADOUTS_PER_FRAME]); } forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, [LOADOUTS_PER_FRAME, count _loadouts] select is3DEN]);
}; };
if (_currentFrame != _framesToFill) exitWith { if (!is3DEN && _currentFrame != _framesToFill) exitWith {
_this set [2, _currentFrame + 1]; _this set [2, _currentFrame + 1];
[FUNC(fillLoadoutsList), _this] call CBA_fnc_execNextFrame; [FUNC(fillLoadoutsList), _this] call CBA_fnc_execNextFrame;
}; };