mirror of
https://github.com/IT07/a3_vemf_reloaded.git
synced 2024-08-30 16:52:11 +00:00
Should be faster
This commit is contained in:
parent
10b59ab1ee
commit
72bc999ed6
@ -26,27 +26,22 @@ if (_this isEqualType []) then
|
|||||||
{ // Select random scope
|
{ // Select random scope
|
||||||
private ["_scopes"];
|
private ["_scopes"];
|
||||||
_scopes = getArray (configFile >> "CfgWeapons" >> _primaryWeapon >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
|
_scopes = getArray (configFile >> "CfgWeapons" >> _primaryWeapon >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
|
||||||
if ("allowTWS" call VEMFr_fnc_getSetting isEqualTo 0) then
|
if (("allowTWS" call VEMFr_fnc_getSetting) isEqualTo 0) then
|
||||||
{
|
{
|
||||||
private["_indexes"];
|
private["_forbiddenScopes"];
|
||||||
_indexes = [];
|
_forbiddenScopes = [];
|
||||||
{
|
{
|
||||||
if (_x find "tws" > -1) then
|
if (((toLower _x) find "tws") > -1) then
|
||||||
{
|
{
|
||||||
_indexes pushBack _forEachIndex;
|
_forbiddenScopes pushBack _x;
|
||||||
} else
|
|
||||||
{
|
|
||||||
if (_x find "TWS" > -1) then
|
|
||||||
{
|
|
||||||
_indexes pushBack _forEachIndex;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} forEach _scopes;
|
} forEach _scopes;
|
||||||
{
|
{
|
||||||
_scopes deleteAt _x;
|
_index = _scopes find _x;
|
||||||
} forEach _indexes;
|
_scopes deleteAt _index;
|
||||||
|
} forEach _forbiddenScopes;
|
||||||
};
|
};
|
||||||
_unit addPrimaryWeaponItem (selectRandom _scopes);
|
_unit addPrimaryWeaponItem (selectRandom _scopes);
|
||||||
};
|
};
|
||||||
if (selectRandom _randomPattern isEqualTo 1) then
|
if (selectRandom _randomPattern isEqualTo 1) then
|
||||||
{ // Select random muzzle
|
{ // Select random muzzle
|
||||||
|
Loading…
Reference in New Issue
Block a user