mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
General - Change count
to forEach
where appropriate (#9890)
count -> forEach Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
ccb3e65734
commit
8f46ffd8d5
@ -16,9 +16,8 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
|
|||||||
{
|
{
|
||||||
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
|
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||||
if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; };
|
if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; };
|
||||||
} count (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines"));
|
} forEach (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines"));
|
||||||
nil
|
} forEach getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
||||||
} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
|
||||||
|
|
||||||
|
|
||||||
// Add keybinds
|
// Add keybinds
|
||||||
|
@ -44,8 +44,7 @@
|
|||||||
_addedPickUpHelpers pushBack _pickUpHelper;
|
_addedPickUpHelpers pushBack _pickUpHelper;
|
||||||
_throwablesHelped pushBack _x;
|
_throwablesHelped pushBack _x;
|
||||||
};
|
};
|
||||||
nil
|
} forEach _nearThrowables;
|
||||||
} count _nearThrowables;
|
|
||||||
|
|
||||||
_args set [0, getPosASL ACE_player];
|
_args set [0, getPosASL ACE_player];
|
||||||
_args set [3, _nearThrowables];
|
_args set [3, _nearThrowables];
|
||||||
@ -56,11 +55,10 @@
|
|||||||
{
|
{
|
||||||
// Only handling with attachTo works nicely
|
// Only handling with attachTo works nicely
|
||||||
_x attachTo [_x getVariable [QGVAR(throwable), objNull], [0, 0, 0]];
|
_x attachTo [_x getVariable [QGVAR(throwable), objNull], [0, 0, 0]];
|
||||||
nil
|
} forEach _addedPickUpHelpers;
|
||||||
} count _addedPickUpHelpers;
|
|
||||||
} else {
|
} else {
|
||||||
TRACE_1("Cleaning Pick Up Helpers",count _addedPickUpHelpers);
|
TRACE_1("Cleaning Pick Up Helpers",count _addedPickUpHelpers);
|
||||||
{deleteVehicle _x} count _addedPickUpHelpers;
|
{deleteVehicle _x} forEach _addedPickUpHelpers;
|
||||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
}, 0, [(getPosASL ACE_player) vectorAdd [-100, 0, 0], [], [], []]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [(getPosASL ACE_player) vectorAdd [-100, 0, 0], [], [], []]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -30,6 +30,6 @@ _vehicle == vehicle _unit
|
|||||||
if (_unit == _x select FULLCREW_UNIT) exitWith {
|
if (_unit == _x select FULLCREW_UNIT) exitWith {
|
||||||
_ejectVarName = format [QGVAR(ejectAction_%1_%2), _x select FULLCREW_ROLE, _x select FULLCREW_TURRETPATH];
|
_ejectVarName = format [QGVAR(ejectAction_%1_%2), _x select FULLCREW_ROLE, _x select FULLCREW_TURRETPATH];
|
||||||
};
|
};
|
||||||
} count fullCrew _vehicle;
|
} forEach fullCrew _vehicle;
|
||||||
_vehicle getVariable [_ejectVarName, false]
|
_vehicle getVariable [_ejectVarName, false]
|
||||||
}
|
}
|
||||||
|
@ -145,8 +145,7 @@ if (isServer) then {
|
|||||||
INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x);
|
INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x);
|
||||||
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
|
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
|
||||||
};
|
};
|
||||||
nil
|
} forEach (curatorEditableObjects _zeusLogic);
|
||||||
} count (curatorEditableObjects _zeusLogic);
|
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
@ -43,8 +43,7 @@ if (isServer) then {
|
|||||||
{
|
{
|
||||||
_x params ["", "_eventArgs","_ttl"];
|
_x params ["", "_eventArgs","_ttl"];
|
||||||
[_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
|
[_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
|
||||||
false
|
} forEach _eventLog;
|
||||||
} count _eventLog;
|
|
||||||
|
|
||||||
INFO_1("[%1] synchronized",_eventName);
|
INFO_1("[%1] synchronized",_eventName);
|
||||||
};
|
};
|
||||||
|
@ -28,18 +28,13 @@ if (_list isEqualType "") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
if (!isNil "_x") then {
|
if (!isNil "_x" && {_x isEqualType objNull} && {local _x}) then {
|
||||||
if (_x isEqualType objNull) then {
|
if (_vehicle) then {
|
||||||
if (local _x) then {
|
(vehicle _x) setVariable [_variable, _setting, _global];
|
||||||
if (_vehicle) then {
|
TRACE_6("Set variable vehicle",_x,vehicle _x,typeOf (vehicle _x),_variable,_setting,_global);
|
||||||
(vehicle _x) setVariable [_variable, _setting, _global];
|
} else {
|
||||||
TRACE_6("Set variable vehicle",_x,vehicle _x,typeOf (vehicle _x),_variable,_setting,_global);
|
_x setVariable [_variable, _setting, _global];
|
||||||
} else {
|
TRACE_5("Set variable",_x,typeOf _x,_variable,_setting,_global);
|
||||||
_x setVariable [_variable, _setting, _global];
|
|
||||||
TRACE_5("Set variable",_x,typeOf _x,_variable,_setting,_global);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach _list;
|
||||||
} count _list;
|
|
||||||
|
@ -66,8 +66,7 @@ GVAR(settingsMovedToSQF) = [];
|
|||||||
INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized));
|
INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized));
|
||||||
{
|
{
|
||||||
(_x select 1) call (_x select 0);
|
(_x select 1) call (_x select 0);
|
||||||
false
|
} forEach GVAR(runAtSettingsInitialized);
|
||||||
} count GVAR(runAtSettingsInitialized);
|
|
||||||
GVAR(runAtSettingsInitialized) = nil; //cleanup
|
GVAR(runAtSettingsInitialized) = nil; //cleanup
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
|
@ -53,8 +53,7 @@ private _refresh = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
ctrlDelete _x;
|
ctrlDelete _x;
|
||||||
false
|
} forEach _allControls;
|
||||||
} count _allControls;
|
|
||||||
|
|
||||||
_allControls = [];
|
_allControls = [];
|
||||||
|
|
||||||
@ -80,7 +79,6 @@ private _refresh = {
|
|||||||
_ctrl ctrlSetTextColor _xcolor;
|
_ctrl ctrlSetTextColor _xcolor;
|
||||||
_ctrl ctrlCommit 0;
|
_ctrl ctrlCommit 0;
|
||||||
_allControls pushBack _ctrl;
|
_allControls pushBack _ctrl;
|
||||||
false
|
|
||||||
} forEach (missionNamespace getVariable [QGVAR(displayIconList),[]]);
|
} forEach (missionNamespace getVariable [QGVAR(displayIconList),[]]);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -116,8 +114,7 @@ if (_show) then {
|
|||||||
if (_x select 0 != _iconId) then {
|
if (_x select 0 != _iconId) then {
|
||||||
_newList pushBack _x;
|
_newList pushBack _x;
|
||||||
};
|
};
|
||||||
false
|
} forEach _list;
|
||||||
} count _list;
|
|
||||||
|
|
||||||
missionNamespace setVariable [QGVAR(displayIconList), _newList];
|
missionNamespace setVariable [QGVAR(displayIconList), _newList];
|
||||||
call _refresh;
|
call _refresh;
|
||||||
|
@ -34,8 +34,7 @@ if (IS_ARRAY(_var)) then {
|
|||||||
|
|
||||||
{
|
{
|
||||||
[_x, _depth] call FUNC(dumpArray);
|
[_x, _depth] call FUNC(dumpArray);
|
||||||
false
|
} forEach _var;
|
||||||
} count _var;
|
|
||||||
|
|
||||||
diag_log text format ["%1],", _pad];
|
diag_log text format ["%1],", _pad];
|
||||||
};
|
};
|
||||||
|
@ -25,8 +25,7 @@ if (!isNil "ACE_PFH_COUNTER") then {
|
|||||||
private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
|
private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
|
||||||
|
|
||||||
diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
|
diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
|
||||||
false
|
} forEach ACE_PFH_COUNTER;
|
||||||
} count ACE_PFH_COUNTER;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
diag_log text format ["ACE COUNTER RESULTS"];
|
diag_log text format ["ACE COUNTER RESULTS"];
|
||||||
@ -50,8 +49,7 @@ diag_log text format ["-------------------------------------------"];
|
|||||||
};
|
};
|
||||||
|
|
||||||
_iter = _iter + 1;
|
_iter = _iter + 1;
|
||||||
false
|
} forEach _counterEntry;
|
||||||
} count _counterEntry;
|
|
||||||
|
|
||||||
// results
|
// results
|
||||||
_averageResult = (_total / _count) * 1000;
|
_averageResult = (_total / _count) * 1000;
|
||||||
@ -61,8 +59,7 @@ diag_log text format ["-------------------------------------------"];
|
|||||||
} else {
|
} else {
|
||||||
diag_log text format ["%1: No results", _counterEntry select 0];
|
diag_log text format ["%1: No results", _counterEntry select 0];
|
||||||
};
|
};
|
||||||
false
|
} forEach ACE_COUNTERS;
|
||||||
} count ACE_COUNTERS;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Dump PFH Trackers
|
// Dump PFH Trackers
|
||||||
|
@ -50,8 +50,7 @@ if (_unit isKindOf "CAManBase") then {
|
|||||||
_gunner = _unit turretUnit _x;
|
_gunner = _unit turretUnit _x;
|
||||||
_turret = _x;
|
_turret = _x;
|
||||||
};
|
};
|
||||||
false
|
} forEach allTurrets [_unit, true];
|
||||||
} count allTurrets [_unit, true];
|
|
||||||
// Ensure that at least the pilot is returned if there is no gunner
|
// Ensure that at least the pilot is returned if there is no gunner
|
||||||
if (isManualFire _unit && {isNull _gunner}) then {
|
if (isManualFire _unit && {isNull _gunner}) then {
|
||||||
_gunner = effectiveCommander _unit;
|
_gunner = effectiveCommander _unit;
|
||||||
|
@ -35,7 +35,6 @@ private _return = [];
|
|||||||
_return pushBack [_x select 0, typeName _val, _val, _x select 2, _x select 5];
|
_return pushBack [_x select 0, typeName _val, _val, _x select 2, _x select 5];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach GVAR(OBJECT_VARIABLES_STORAGE);
|
||||||
} count GVAR(OBJECT_VARIABLES_STORAGE);
|
|
||||||
|
|
||||||
_return
|
_return
|
||||||
|
@ -29,7 +29,6 @@ private _doorTurrets = [];
|
|||||||
if (((getNumber (_config >> "isCopilot")) == 0) && {count getArray (_config >> "weapons") > 0}) then {
|
if (((getNumber (_config >> "isCopilot")) == 0) && {count getArray (_config >> "weapons") > 0}) then {
|
||||||
_doorTurrets pushBack _x;
|
_doorTurrets pushBack _x;
|
||||||
};
|
};
|
||||||
false
|
} forEach _turrets;
|
||||||
} count _turrets;
|
|
||||||
|
|
||||||
_doorTurrets
|
_doorTurrets
|
||||||
|
@ -28,8 +28,7 @@ private _gunner = objNull;
|
|||||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||||
_gunner = _vehicle turretUnit _x;
|
_gunner = _vehicle turretUnit _x;
|
||||||
};
|
};
|
||||||
false
|
} forEach allTurrets [_vehicle, true];
|
||||||
} count allTurrets [_vehicle, true];
|
|
||||||
|
|
||||||
// ensure that at least the pilot is returned if there is no gunner
|
// ensure that at least the pilot is returned if there is no gunner
|
||||||
if (isManualFire _vehicle && {isNull _gunner}) then {
|
if (isManualFire _vehicle && {isNull _gunner}) then {
|
||||||
|
@ -38,8 +38,7 @@ private _enemiesInVehicle = false; //Possible Side Restriction
|
|||||||
|
|
||||||
{
|
{
|
||||||
if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true};
|
if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true};
|
||||||
false
|
} forEach crew _vehicle;
|
||||||
} count crew _vehicle;
|
|
||||||
|
|
||||||
switch (_position) do {
|
switch (_position) do {
|
||||||
case "driver" : {
|
case "driver" : {
|
||||||
|
@ -38,8 +38,7 @@ private _stepY = 1e10;
|
|||||||
_stepX = getNumber (_x >> "stepX");
|
_stepX = getNumber (_x >> "stepX");
|
||||||
_stepY = getNumber (_x >> "stepY");
|
_stepY = getNumber (_x >> "stepY");
|
||||||
};
|
};
|
||||||
false
|
} forEach configProperties [_cfgGrid, "isClass _x", false];
|
||||||
} count configProperties [_cfgGrid, "isClass _x", false];
|
|
||||||
|
|
||||||
private _letterGrid = false;
|
private _letterGrid = false;
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ if (_unit isKindOf "CAManBase") then {
|
|||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
_return = _return + ({_x == _magazine} count magazines _x);
|
_return = _return + ({_x == _magazine} count magazines _x);
|
||||||
false
|
} forEach crew _unit;
|
||||||
} count crew _unit;
|
|
||||||
|
|
||||||
(getMagazineCargo _unit) params [["_magNames", []], ["_magCount", []]];
|
(getMagazineCargo _unit) params [["_magNames", []], ["_magCount", []]];
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,6 @@ scopeName "main";
|
|||||||
|
|
||||||
{
|
{
|
||||||
if (_unit == (_vehicle turretUnit _x)) then {_x breakOut "main"};
|
if (_unit == (_vehicle turretUnit _x)) then {_x breakOut "main"};
|
||||||
nil
|
} forEach allTurrets [_vehicle, true];
|
||||||
} count allTurrets [_vehicle, true];
|
|
||||||
|
|
||||||
[]
|
[]
|
||||||
|
@ -33,7 +33,6 @@ private _crew = [];
|
|||||||
_crew pushBack (_x select 0);
|
_crew pushBack (_x select 0);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach fullCrew _vehicle;
|
||||||
} count fullCrew _vehicle;
|
|
||||||
|
|
||||||
_crew
|
_crew
|
||||||
|
@ -29,7 +29,6 @@ private _modes = [];
|
|||||||
if (_x == "this") then {
|
if (_x == "this") then {
|
||||||
_modes pushBack _weapon;
|
_modes pushBack _weapon;
|
||||||
};
|
};
|
||||||
false
|
} forEach getArray (_config >> "modes");
|
||||||
} count getArray (_config >> "modes");
|
|
||||||
|
|
||||||
_modes
|
_modes
|
||||||
|
@ -42,7 +42,6 @@ private _ammo = _muzzles apply {0};
|
|||||||
_ammo set [_index, _x select 1];
|
_ammo set [_index, _x select 1];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach magazinesAmmoFull _unit;
|
||||||
} count magazinesAmmoFull _unit;
|
|
||||||
|
|
||||||
[_attachments, _muzzles, _magazines, _ammo];
|
[_attachments, _muzzles, _magazines, _ammo];
|
||||||
|
@ -28,8 +28,7 @@ if (isNil QGVAR(LSD_Vehicles)) then {
|
|||||||
if (_hSCount > 0) then {
|
if (_hSCount > 0) then {
|
||||||
GVAR(LSD_Vehicles) pushBack [_x, _hSCount];
|
GVAR(LSD_Vehicles) pushBack [_x, _hSCount];
|
||||||
};
|
};
|
||||||
nil
|
} forEach _units;
|
||||||
} count _units;
|
|
||||||
|
|
||||||
if (isNil QGVAR(LSD_Colors)) then {
|
if (isNil QGVAR(LSD_Colors)) then {
|
||||||
GVAR(LSD_Colors) = [
|
GVAR(LSD_Colors) = [
|
||||||
@ -51,8 +50,7 @@ if (isNil QGVAR(LSD_PFH)) then {
|
|||||||
for "_i" from 0 to (_hSCount - 1) do {
|
for "_i" from 0 to (_hSCount - 1) do {
|
||||||
_vehicle setObjectTexture [_i, GVAR(LSD_Colors) select _index];
|
_vehicle setObjectTexture [_i, GVAR(LSD_Colors) select _index];
|
||||||
};
|
};
|
||||||
nil
|
} forEach GVAR(LSD_Vehicles);
|
||||||
} count GVAR(LSD_Vehicles);
|
|
||||||
|
|
||||||
_index = ((_index + 1) % 7) mod count GVAR(LSD_Colors);
|
_index = ((_index + 1) % 7) mod count GVAR(LSD_Colors);
|
||||||
(_this select 0) set [0, _index];
|
(_this select 0) set [0, _index];
|
||||||
|
@ -32,8 +32,7 @@ private _whitespaceList = [];
|
|||||||
} else {
|
} else {
|
||||||
_whitespaceList pushBack ([_x] call CBA_fnc_trim);
|
_whitespaceList pushBack ([_x] call CBA_fnc_trim);
|
||||||
};
|
};
|
||||||
false
|
} forEach _list;
|
||||||
} count _list;
|
|
||||||
|
|
||||||
_list = _whitespaceList;
|
_list = _whitespaceList;
|
||||||
TRACE_1("Whitespace List",_list);
|
TRACE_1("Whitespace List",_list);
|
||||||
@ -46,8 +45,7 @@ if (_checkNil) then {
|
|||||||
if (!isNil _x) then {
|
if (!isNil _x) then {
|
||||||
_nilCheckedList pushBack (missionNamespace getVariable _x);
|
_nilCheckedList pushBack (missionNamespace getVariable _x);
|
||||||
};
|
};
|
||||||
false
|
} forEach _list;
|
||||||
} count _list;
|
|
||||||
|
|
||||||
_list = _nilCheckedList;
|
_list = _nilCheckedList;
|
||||||
};
|
};
|
||||||
|
@ -27,8 +27,7 @@ if (isPlayer _unit) then {
|
|||||||
// clear all disable user input
|
// clear all disable user input
|
||||||
{
|
{
|
||||||
[_x, false] call FUNC(setDisableUserInputStatus);
|
[_x, false] call FUNC(setDisableUserInputStatus);
|
||||||
false
|
} forEach GVAR(DISABLE_USER_INPUT_COLLECTION);
|
||||||
} count GVAR(DISABLE_USER_INPUT_COLLECTION);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -36,5 +35,4 @@ if (isPlayer _unit) then {
|
|||||||
if !(_x select 4) then {
|
if !(_x select 4) then {
|
||||||
_unit setVariable [_x select 0, nil, _x select 3];
|
_unit setVariable [_x select 0, nil, _x select 3];
|
||||||
};
|
};
|
||||||
false
|
} forEach ([_unit] call FUNC(getAllDefinedSetVariables));
|
||||||
} count ([_unit] call FUNC(getAllDefinedSetVariables));
|
|
||||||
|
@ -24,6 +24,4 @@ _respawnVariables pushBack "ACE_PersistentFunctions";
|
|||||||
|
|
||||||
{
|
{
|
||||||
_unit setVariable [_x, _unit getVariable _x, true];
|
_unit setVariable [_x, _unit getVariable _x, true];
|
||||||
false
|
} forEach _respawnVariables;
|
||||||
} count _respawnVariables;
|
|
||||||
nil
|
|
||||||
|
@ -47,7 +47,6 @@ private _array = [];
|
|||||||
_array pushBack _x;
|
_array pushBack _x;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach toArray _string;
|
||||||
} count toArray _string;
|
|
||||||
|
|
||||||
toString _array // return
|
toString _array // return
|
||||||
|
@ -29,8 +29,7 @@ if (isNil QGVAR(publishSchedId)) then {
|
|||||||
{
|
{
|
||||||
_x params ["_unit", "_varName"];
|
_x params ["_unit", "_varName"];
|
||||||
_unit setVariable [_varName, _unit getVariable _varName, true];
|
_unit setVariable [_varName, _unit getVariable _varName, true];
|
||||||
false
|
} forEach GVAR(publishVarNames);
|
||||||
} count GVAR(publishVarNames);
|
|
||||||
|
|
||||||
GVAR(publishVarNames) = [];
|
GVAR(publishVarNames) = [];
|
||||||
GVAR(publishNextTime) = 1e7;
|
GVAR(publishNextTime) = 1e7;
|
||||||
|
@ -22,7 +22,7 @@ params ["_wirecoil", "_unit"];
|
|||||||
private _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0];
|
private _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0];
|
||||||
{
|
{
|
||||||
_wireNoGeo animate [_x, 1];
|
_wireNoGeo animate [_x, 1];
|
||||||
} count WIRE_FAST;
|
} forEach WIRE_FAST;
|
||||||
|
|
||||||
GVAR(placer) = _unit;
|
GVAR(placer) = _unit;
|
||||||
private _dir = getDir _unit;
|
private _dir = getDir _unit;
|
||||||
@ -51,7 +51,7 @@ GVAR(deployPFH) = [{
|
|||||||
private _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0];
|
private _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0];
|
||||||
{
|
{
|
||||||
_wire animate [_x, _anim];
|
_wire animate [_x, _anim];
|
||||||
} count WIRE_FAST;
|
} forEach WIRE_FAST;
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args", "_idPFH"];
|
params ["_args", "_idPFH"];
|
||||||
@ -74,7 +74,7 @@ GVAR(deployPFH) = [{
|
|||||||
_wireNoGeo setDir _dir;
|
_wireNoGeo setDir _dir;
|
||||||
{
|
{
|
||||||
_wireNoGeo animate [_x, _anim];
|
_wireNoGeo animate [_x, _anim];
|
||||||
} count WIRE_FAST;
|
} forEach WIRE_FAST;
|
||||||
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
[LLSTRING(RollWire), "", ""] call EFUNC(interaction,showMouseHint);
|
[LLSTRING(RollWire), "", ""] call EFUNC(interaction,showMouseHint);
|
||||||
|
@ -20,7 +20,7 @@ params ["_wire"];
|
|||||||
|
|
||||||
{
|
{
|
||||||
_wire animate [_x, 1];
|
_wire animate [_x, 1];
|
||||||
} count WIRE_FAST;
|
} forEach WIRE_FAST;
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args", "_idPFH"];
|
params ["_args", "_idPFH"];
|
||||||
|
@ -50,7 +50,7 @@ if (!_doNotDropAmmo) then {
|
|||||||
if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith {
|
if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith {
|
||||||
_holder = _x;
|
_holder = _x;
|
||||||
};
|
};
|
||||||
} count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]);
|
} forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]);
|
||||||
};
|
};
|
||||||
|
|
||||||
//Create a new weapon holder
|
//Create a new weapon holder
|
||||||
|
@ -93,7 +93,7 @@ GVAR(disarmTarget) = _target;
|
|||||||
if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith {
|
if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith {
|
||||||
_holder = _x;
|
_holder = _x;
|
||||||
};
|
};
|
||||||
} count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]);
|
} forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]);
|
||||||
|
|
||||||
//If a holder exists, show it's inventory
|
//If a holder exists, show it's inventory
|
||||||
if (!isNull _holder) then {
|
if (!isNull _holder) then {
|
||||||
|
@ -29,10 +29,10 @@ private _hasRequired = true;
|
|||||||
private _detonators = [_unit] call FUNC(getDetonators);
|
private _detonators = [_unit] call FUNC(getDetonators);
|
||||||
|
|
||||||
{
|
{
|
||||||
if !(_x in _detonators) exitWith{
|
if !(_x in _detonators) exitWith {
|
||||||
_hasRequired = false;
|
_hasRequired = false;
|
||||||
};
|
};
|
||||||
} count _requiredItems;
|
} forEach _requiredItems;
|
||||||
|
|
||||||
private _code = "";
|
private _code = "";
|
||||||
while {true} do {
|
while {true} do {
|
||||||
|
@ -31,7 +31,7 @@ private _children = [];
|
|||||||
if !(_x in _detonators) exitWith {
|
if !(_x in _detonators) exitWith {
|
||||||
_hasRequiredItems = false;
|
_hasRequiredItems = false;
|
||||||
};
|
};
|
||||||
} count _required;
|
} forEach _required;
|
||||||
if (_hasRequiredItems && {(!_isAttached) || {(getNumber (_x >> "isAttachable")) == 1}}) then {
|
if (_hasRequiredItems && {(!_isAttached) || {(getNumber (_x >> "isAttachable")) == 1}}) then {
|
||||||
_children pushBack
|
_children pushBack
|
||||||
[
|
[
|
||||||
|
@ -24,7 +24,6 @@ private _explosive = [];
|
|||||||
if ((_x select 1) == _code) exitWith {
|
if ((_x select 1) == _code) exitWith {
|
||||||
_explosive = _x;
|
_explosive = _x;
|
||||||
};
|
};
|
||||||
false
|
} forEach GVAR(CellphoneIEDs);
|
||||||
} count GVAR(CellphoneIEDs);
|
|
||||||
|
|
||||||
_explosive
|
_explosive
|
||||||
|
@ -34,8 +34,8 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
|
|||||||
//Only delete the hook first so the rope falls down.
|
//Only delete the hook first so the rope falls down.
|
||||||
//Note: ropeDetach was used here before, but the command seems a bit broken.
|
//Note: ropeDetach was used here before, but the command seems a bit broken.
|
||||||
deleteVehicle _hook;
|
deleteVehicle _hook;
|
||||||
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call CBA_fnc_waitAndExecute;
|
[{{deleteVehicle _x} forEach _this}, [_ropeTop, _ropeBottom, _dummy], 60] call CBA_fnc_waitAndExecute;
|
||||||
} count _deployedRopes;
|
} forEach _deployedRopes;
|
||||||
|
|
||||||
_vehicle setVariable [QGVAR(deployedRopes), [], true];
|
_vehicle setVariable [QGVAR(deployedRopes), [], true];
|
||||||
|
|
||||||
|
@ -67,9 +67,7 @@ if (GVAR(requireRopeItems) && {_ropeClass != ""}) then {
|
|||||||
|
|
||||||
//deployedRopes format: attachment point, top part of the rope, bottom part of the rope, attachTo helper object, occupied, broken
|
//deployedRopes format: attachment point, top part of the rope, bottom part of the rope, attachTo helper object, occupied, broken
|
||||||
_deployedRopes pushBack [_ropeOrigin, _ropeTop, _ropeBottom, _dummy, _hook, false, false];
|
_deployedRopes pushBack [_ropeOrigin, _ropeTop, _ropeBottom, _dummy, _hook, false, false];
|
||||||
|
} forEach _ropeOrigins;
|
||||||
false
|
|
||||||
} count _ropeOrigins;
|
|
||||||
|
|
||||||
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
|
_vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
|
||||||
_vehicle setVariable [QGVAR(deploymentStage), 3, true];
|
_vehicle setVariable [QGVAR(deploymentStage), 3, true];
|
||||||
|
@ -22,5 +22,4 @@ private _synchedUnits = synchronizedObjects _module;
|
|||||||
_x = vehicle _x;
|
_x = vehicle _x;
|
||||||
};
|
};
|
||||||
[_x] call FUNC(equipFRIES);
|
[_x] call FUNC(equipFRIES);
|
||||||
false
|
} forEach _synchedUnits;
|
||||||
} count _synchedUnits;
|
|
||||||
|
@ -44,8 +44,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret
|
|||||||
if (_x != "this") then {
|
if (_x != "this") then {
|
||||||
_weaponMagazines append getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
_weaponMagazines append getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
||||||
};
|
};
|
||||||
false
|
} forEach _muzzles;
|
||||||
} count _muzzles;
|
|
||||||
|
|
||||||
// Fix the `in` operator being case sensitive and BI fucking up the spelling of their own classnames
|
// Fix the `in` operator being case sensitive and BI fucking up the spelling of their own classnames
|
||||||
private _weaponMagazinesCheck = _weaponMagazines apply {toLowerANSI _x};
|
private _weaponMagazinesCheck = _weaponMagazines apply {toLowerANSI _x};
|
||||||
@ -62,8 +61,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret
|
|||||||
_initSpeed = _initSpeedCoef;
|
_initSpeed = _initSpeedCoef;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach (_vehicle weaponsTurret _turret);
|
||||||
} count (_vehicle weaponsTurret _turret);
|
|
||||||
|
|
||||||
private _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance];
|
private _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance];
|
||||||
_offset = parseNumber _offset;
|
_offset = parseNumber _offset;
|
||||||
@ -72,8 +70,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret
|
|||||||
_FCSMagazines pushBack _magazine;
|
_FCSMagazines pushBack _magazine;
|
||||||
_FCSElevation pushBack _offset;
|
_FCSElevation pushBack _offset;
|
||||||
};
|
};
|
||||||
false
|
} forEach (_vehicle magazinesTurret _turret);
|
||||||
} count (_vehicle magazinesTurret _turret);
|
|
||||||
|
|
||||||
[_vehicle, format ["%1_%2", QGVAR(Distance), _turret], _distance] call EFUNC(common,setVariablePublic);
|
[_vehicle, format ["%1_%2", QGVAR(Distance), _turret], _distance] call EFUNC(common,setVariablePublic);
|
||||||
[_vehicle, format ["%1_%2", QGVAR(InitSpeed), _turret], _FCSInitSpeed] call EFUNC(common,setVariablePublic);
|
[_vehicle, format ["%1_%2", QGVAR(InitSpeed), _turret], _FCSInitSpeed] call EFUNC(common,setVariablePublic);
|
||||||
|
@ -42,7 +42,7 @@ private _sendFingerToPlayers = [];
|
|||||||
private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]);
|
private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]);
|
||||||
{
|
{
|
||||||
_nearbyMen append (crew _x);
|
_nearbyMen append (crew _x);
|
||||||
} count (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]);
|
} forEach (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]);
|
||||||
{
|
{
|
||||||
if ((((eyePos _x) vectorDistance _playerEyePosASL) < GVAR(maxRange)) &&
|
if ((((eyePos _x) vectorDistance _playerEyePosASL) < GVAR(maxRange)) &&
|
||||||
{alive _x} &&
|
{alive _x} &&
|
||||||
@ -53,8 +53,7 @@ private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]
|
|||||||
|
|
||||||
_sendFingerToPlayers pushBack _x;
|
_sendFingerToPlayers pushBack _x;
|
||||||
};
|
};
|
||||||
true
|
} forEach _nearbyMen;
|
||||||
} count _nearbyMen;
|
|
||||||
|
|
||||||
TRACE_1("sending finger to",_sendFingerToPlayers);
|
TRACE_1("sending finger to",_sendFingerToPlayers);
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ if (!hasInterface) exitWith {};
|
|||||||
[_key, [false, (_key != -1), false]],
|
[_key, [false, (_key != -1), false]],
|
||||||
false
|
false
|
||||||
] call CBA_fnc_addKeybind;
|
] call CBA_fnc_addKeybind;
|
||||||
|
} forEach [
|
||||||
false
|
|
||||||
} count [
|
|
||||||
["Freeze", 80], // Numpad 2
|
["Freeze", 80], // Numpad 2
|
||||||
["Cover", 81], // Numpad 3
|
["Cover", 81], // Numpad 3
|
||||||
["Forward", 75], // Numpad 4
|
["Forward", 75], // Numpad 4
|
||||||
|
@ -36,7 +36,6 @@ private _rotorWash = [false, 0];
|
|||||||
_rotorWash set [1, _distance];
|
_rotorWash set [1, _distance];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
false
|
} forEach (position _unit nearEntities [["Helicopter"], _radius]);
|
||||||
} count (position _unit nearEntities [["Helicopter"], _radius]);
|
|
||||||
|
|
||||||
_rotorWash
|
_rotorWash
|
||||||
|
@ -85,7 +85,7 @@ _affected = _affected - [ACE_player];
|
|||||||
}, [_unit]] call CBA_fnc_waitUntilAndExecute;
|
}, [_unit]] call CBA_fnc_waitUntilAndExecute;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} count _affected;
|
} forEach _affected;
|
||||||
|
|
||||||
// Affect local player, independently of distance
|
// Affect local player, independently of distance
|
||||||
if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then {
|
if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then {
|
||||||
|
@ -53,7 +53,7 @@ if (isNil "_loudness") then {
|
|||||||
private _muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
private _muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
||||||
_weaponMagazines append _muzzleMagazines;
|
_weaponMagazines append _muzzleMagazines;
|
||||||
};
|
};
|
||||||
} count _muzzles;
|
} forEach _muzzles;
|
||||||
{
|
{
|
||||||
private _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
private _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||||
_weaponMagazines set [_forEachIndex, [_x, _ammoType]];
|
_weaponMagazines set [_forEachIndex, [_x, _ammoType]];
|
||||||
@ -65,7 +65,7 @@ if (isNil "_loudness") then {
|
|||||||
if (_ammoType == _ammo) exitWith {
|
if (_ammoType == _ammo) exitWith {
|
||||||
_magazine = _magazineType;
|
_magazine = _magazineType;
|
||||||
};
|
};
|
||||||
} count _weaponMagazines;
|
} forEach _weaponMagazines;
|
||||||
|
|
||||||
if (_magazine == "") then {
|
if (_magazine == "") then {
|
||||||
_loudness = 0;
|
_loudness = 0;
|
||||||
|
@ -77,8 +77,7 @@ GVAR(no_cams) sort true;
|
|||||||
if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then {
|
if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then {
|
||||||
GVAR(no_cams) pushBack _x;
|
GVAR(no_cams) pushBack _x;
|
||||||
};
|
};
|
||||||
true
|
} forEach GVAR(nearHuntIRs);
|
||||||
} count GVAR(nearHuntIRs);
|
|
||||||
{
|
{
|
||||||
if (((getPosVisual _x) select 2) <= 20 || {!(_x in GVAR(nearHuntIRs))} || {_x getHitPointDamage "HitCamera" >= 0.25}) then {
|
if (((getPosVisual _x) select 2) <= 20 || {!(_x in GVAR(nearHuntIRs))} || {_x getHitPointDamage "HitCamera" >= 0.25}) then {
|
||||||
GVAR(no_cams) deleteAt _forEachIndex;
|
GVAR(no_cams) deleteAt _forEachIndex;
|
||||||
|
@ -67,8 +67,7 @@ if (_insertChildrenCode isNotEqualTo {}) then {
|
|||||||
if ((count _action) > 0) then {
|
if ((count _action) > 0) then {
|
||||||
_activeChildren pushBack _action;
|
_activeChildren pushBack _action;
|
||||||
};
|
};
|
||||||
nil
|
} forEach _dynamicChildren;
|
||||||
} count _dynamicChildren;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Collect children class actions
|
// Collect children class actions
|
||||||
@ -77,8 +76,7 @@ if (_insertChildrenCode isNotEqualTo {}) then {
|
|||||||
if ((count _action) > 0) then {
|
if ((count _action) > 0) then {
|
||||||
_activeChildren pushBack _action;
|
_activeChildren pushBack _action;
|
||||||
};
|
};
|
||||||
nil
|
} forEach _origActionChildren;
|
||||||
} count _origActionChildren;
|
|
||||||
|
|
||||||
// Collect children object actions
|
// Collect children object actions
|
||||||
{
|
{
|
||||||
@ -91,8 +89,7 @@ if (_insertChildrenCode isNotEqualTo {}) then {
|
|||||||
_activeChildren pushBack _action;
|
_activeChildren pushBack _action;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nil
|
} forEach GVAR(objectActionList);
|
||||||
} count GVAR(objectActionList);
|
|
||||||
|
|
||||||
|
|
||||||
// If the original action has no statement, and no children, don't display it
|
// If the original action has no statement, and no children, don't display it
|
||||||
|
@ -114,8 +114,7 @@ private _recurseFnc = {
|
|||||||
];
|
];
|
||||||
_actions pushBack _entry;
|
_actions pushBack _entry;
|
||||||
};
|
};
|
||||||
nil
|
} forEach (configProperties [_actionsCfg, "isClass _x", true]);
|
||||||
} count (configProperties [_actionsCfg, "isClass _x", true]);
|
|
||||||
_actions
|
_actions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,8 +84,7 @@ private _recurseFnc = {
|
|||||||
];
|
];
|
||||||
_actions pushBack _entry;
|
_actions pushBack _entry;
|
||||||
};
|
};
|
||||||
nil
|
} forEach (configProperties [_actionsCfg, "isClass _x", true]);
|
||||||
} count (configProperties [_actionsCfg, "isClass _x", true]);
|
|
||||||
_actions
|
_actions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@ private _actions = [];
|
|||||||
_x params ["_actionData", "_children"];
|
_x params ["_actionData", "_children"];
|
||||||
|
|
||||||
_actions pushBack [_actionData, _children, _unit];
|
_actions pushBack [_actionData, _children, _unit];
|
||||||
false
|
} forEach (_actionTrees select 0 select 1);
|
||||||
} count (_actionTrees select 0 select 1);
|
|
||||||
|
|
||||||
_actions
|
_actions
|
||||||
|
@ -28,5 +28,4 @@ private _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
|||||||
if (count weapons _x == 0 && {random 1 < _chance}) then {
|
if (count weapons _x == 0 && {random 1 < _chance}) then {
|
||||||
[QGVAR(getDown), [_x], [_x]] call CBA_fnc_targetEvent;
|
[QGVAR(getDown), [_x], [_x]] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
false
|
} forEach (_target nearEntities ["Civilian", SEND_RADIUS]);
|
||||||
} count (_target nearEntities ["Civilian", SEND_RADIUS]);
|
|
||||||
|
@ -76,7 +76,7 @@ GVAR(usedScrollWheel) = false;
|
|||||||
if !(GVAR(usedScrollWheel)) then {
|
if !(GVAR(usedScrollWheel)) then {
|
||||||
private _phase = parseNumber (_house animationPhase (_animations select 0) < 0.5);
|
private _phase = parseNumber (_house animationPhase (_animations select 0) < 0.5);
|
||||||
|
|
||||||
{_house animate [_x, _phase]; false} count _animations;
|
{_house animate [_x, _phase]} forEach _animations;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Raise local stopped opening event
|
// Raise local stopped opening event
|
||||||
@ -93,5 +93,5 @@ GVAR(usedScrollWheel) = false;
|
|||||||
GVAR(usedScrollWheel) = true;
|
GVAR(usedScrollWheel) = true;
|
||||||
};
|
};
|
||||||
// do incremental door opening
|
// do incremental door opening
|
||||||
{_house animate [_x, GVAR(doorTargetPhase)]; false} count _animations;
|
{_house animate [_x, GVAR(doorTargetPhase)]} forEach _animations;
|
||||||
}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2, _door]] call CBA_fnc_addPerFrameHandler;
|
}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2, _door]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -31,5 +31,4 @@ private _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
|||||||
|
|
||||||
[QGVAR(sendAway), [_x, _position], [_x]] call CBA_fnc_targetEvent;
|
[QGVAR(sendAway), [_x, _position], [_x]] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
false
|
} forEach (_unit nearEntities ["Civilian", SEND_RADIUS]);
|
||||||
} count (_unit nearEntities ["Civilian", SEND_RADIUS]);
|
|
||||||
|
@ -73,8 +73,7 @@ GVAR(hasWatch) = true;
|
|||||||
GVAR(hasWatch) = false;
|
GVAR(hasWatch) = false;
|
||||||
{
|
{
|
||||||
if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;};
|
if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;};
|
||||||
false
|
} forEach (assignedItems _unit);
|
||||||
} count (assignedItems _unit);
|
|
||||||
}, true] call CBA_fnc_addPlayerEventHandler;
|
}, true] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,5 +49,4 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties);
|
|||||||
_x setMarkerDirLocal _dir;
|
_x setMarkerDirLocal _dir;
|
||||||
_x setMarkerSizeLocal [_scale, _scale];
|
_x setMarkerSizeLocal [_scale, _scale];
|
||||||
};
|
};
|
||||||
false
|
} forEach allMapMarkers;
|
||||||
} count allMapMarkers;
|
|
||||||
|
@ -55,9 +55,7 @@ private _missionRoot = str missionConfigFile select [0, count str missionConfigF
|
|||||||
ERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x);
|
ERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
} forEach _splittedList;
|
||||||
false
|
|
||||||
} count _splittedList;
|
|
||||||
|
|
||||||
if (count _ambianceSounds == 0) exitWith {};
|
if (count _ambianceSounds == 0) exitWith {};
|
||||||
{
|
{
|
||||||
|
@ -138,8 +138,7 @@ if (_enabledTagsNearby) then {
|
|||||||
[ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nil
|
} forEach _targets;
|
||||||
} count _targets;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
END_COUNTER(GVAR(onDraw3d));
|
END_COUNTER(GVAR(onDraw3d));
|
||||||
|
@ -44,7 +44,6 @@ if (GVAR(supply) == 2) exitWith {
|
|||||||
{
|
{
|
||||||
_x params ["_magazine", "_rounds"];
|
_x params ["_magazine", "_rounds"];
|
||||||
if ((_magazine isEqualTo _magazineClass) && (_rounds > 0)) exitWith {_magazinePresent = true; };
|
if ((_magazine isEqualTo _magazineClass) && (_rounds > 0)) exitWith {_magazinePresent = true; };
|
||||||
false
|
} forEach _magazineSupply;
|
||||||
} count _magazineSupply;
|
|
||||||
_magazinePresent
|
_magazinePresent
|
||||||
};
|
};
|
||||||
|
@ -58,8 +58,7 @@ if (GVAR(supply) == 1) then {
|
|||||||
_numChars = _numChars max (count _line);
|
_numChars = _numChars max (count _line);
|
||||||
_text = format ["%1<br/>%2", _text, _line];
|
_text = format ["%1<br/>%2", _text, _line];
|
||||||
_supply = _supply + 0.5;
|
_supply = _supply + 0.5;
|
||||||
false
|
} forEach _magazines;
|
||||||
} count _magazines;
|
|
||||||
};
|
};
|
||||||
if (_supply > 1.5) then {
|
if (_supply > 1.5) then {
|
||||||
[[LSTRING(Hint_RemainingAmmo), _text], _supply, _unit, (_numChars/2.9)] call EFUNC(common,displayTextStructured);
|
[[LSTRING(Hint_RemainingAmmo), _text], _supply, _unit, (_numChars/2.9)] call EFUNC(common,displayTextStructured);
|
||||||
|
@ -28,8 +28,7 @@ if (isServer) then {
|
|||||||
} else {
|
} else {
|
||||||
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_ownerEvent;
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_ownerEvent;
|
||||||
};
|
};
|
||||||
false
|
} forEach _turrets;
|
||||||
} count _turrets;
|
|
||||||
} else {
|
} else {
|
||||||
[QGVAR(rearmEntireVehicleSuccessEH), _this] call CBA_fnc_serverEvent;
|
[QGVAR(rearmEntireVehicleSuccessEH), _this] call CBA_fnc_serverEvent;
|
||||||
};
|
};
|
||||||
|
@ -30,8 +30,7 @@ if (!isNull _logic) then {
|
|||||||
// Add synchronized objects to list
|
// Add synchronized objects to list
|
||||||
{
|
{
|
||||||
_list pushBack _x;
|
_list pushBack _x;
|
||||||
nil
|
} forEach (synchronizedObjects _logic);
|
||||||
} count (synchronizedObjects _logic);
|
|
||||||
|
|
||||||
if (_list isEqualTo []) exitWith {};
|
if (_list isEqualTo []) exitWith {};
|
||||||
|
|
||||||
@ -40,6 +39,5 @@ if (!isNull _logic) then {
|
|||||||
// Add spare parts
|
// Add spare parts
|
||||||
{
|
{
|
||||||
[_x, _amount, _part, true] call FUNC(addSpareParts);
|
[_x, _amount, _part, true] call FUNC(addSpareParts);
|
||||||
false
|
} forEach _list;
|
||||||
} count _list;
|
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,6 @@ if !(_activated) exitWith {};
|
|||||||
|
|
||||||
{
|
{
|
||||||
_x setVariable ["ACE_canMoveRallypoint", true];
|
_x setVariable ["ACE_canMoveRallypoint", true];
|
||||||
false
|
} forEach _units;
|
||||||
} count _units;
|
|
||||||
|
|
||||||
INFO("Rallypoint Module Initialized.");
|
INFO("Rallypoint Module Initialized.");
|
||||||
|
@ -56,8 +56,7 @@ if (inputAction "nextWeapon" > 0) then {
|
|||||||
if (_x == "this") then {
|
if (_x == "this") then {
|
||||||
_modes pushBack _weapon;
|
_modes pushBack _weapon;
|
||||||
};
|
};
|
||||||
nil
|
} forEach getArray (configFile >> "CfgWeapons" >> _weapon >> "modes");
|
||||||
} count getArray (configFile >> "CfgWeapons" >> _weapon >> "modes");
|
|
||||||
|
|
||||||
// select last mode
|
// select last mode
|
||||||
private _mode = _modes select (count _modes - 1);
|
private _mode = _modes select (count _modes - 1);
|
||||||
|
@ -34,7 +34,7 @@ _unit setVariable [QGVAR(isUsingSandbag), true];
|
|||||||
// Force physx update
|
// Force physx update
|
||||||
{
|
{
|
||||||
_x setPosASL (getPosASL _x);
|
_x setPosASL (getPosASL _x);
|
||||||
} count (_unit nearObjects ["ACE_SandbagObject", 5]);
|
} forEach (_unit nearObjects ["ACE_SandbagObject", 5]);
|
||||||
|
|
||||||
[_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory);
|
[_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory);
|
||||||
}, [_unit, _sandbag], 1.5] call CBA_fnc_waitAndExecute;
|
}, [_unit, _sandbag], 1.5] call CBA_fnc_waitAndExecute;
|
||||||
|
@ -34,7 +34,7 @@ private _actions = [];
|
|||||||
(_this select 2) params ["_objects", "_image", "_currentSlideshow", "_selection"];
|
(_this select 2) params ["_objects", "_image", "_currentSlideshow", "_selection"];
|
||||||
{
|
{
|
||||||
_x setObjectTextureGlobal [_selection, _image]
|
_x setObjectTextureGlobal [_selection, _image]
|
||||||
} count _objects;
|
} forEach _objects;
|
||||||
[QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent;
|
[QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent;
|
||||||
},
|
},
|
||||||
{true},
|
{true},
|
||||||
|
@ -36,7 +36,7 @@ private _image = _images select _currentSlide;
|
|||||||
// Set slide
|
// Set slide
|
||||||
{
|
{
|
||||||
_x setObjectTextureGlobal [_selection, _image];
|
_x setObjectTextureGlobal [_selection, _image];
|
||||||
} count _objects;
|
} forEach _objects;
|
||||||
|
|
||||||
[QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent;
|
[QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ if (isServer) then {
|
|||||||
// Default images on whiteboards (first image)
|
// Default images on whiteboards (first image)
|
||||||
{
|
{
|
||||||
_x setObjectTextureGlobal [_selection, _images select 0];
|
_x setObjectTextureGlobal [_selection, _images select 0];
|
||||||
} count _objects;
|
} forEach _objects;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Number of slideshows (multiple modules support)
|
// Number of slideshows (multiple modules support)
|
||||||
@ -89,8 +89,7 @@ if (_duration == 0) then {
|
|||||||
2
|
2
|
||||||
] call EFUNC(interact_menu,createAction);
|
] call EFUNC(interact_menu,createAction);
|
||||||
[_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject);
|
[_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject);
|
||||||
nil
|
} forEach _controllers;
|
||||||
} count _controllers;
|
|
||||||
} else {
|
} else {
|
||||||
if !(isServer) exitWith {};
|
if !(isServer) exitWith {};
|
||||||
|
|
||||||
|
@ -37,8 +37,7 @@ private _selection = _logic getVariable ["Selection", 0];
|
|||||||
// Objects synced to the module
|
// Objects synced to the module
|
||||||
{
|
{
|
||||||
_objects pushBack _x;
|
_objects pushBack _x;
|
||||||
nil
|
} forEach (synchronizedObjects _logic);
|
||||||
} count (synchronizedObjects _logic);
|
|
||||||
|
|
||||||
// Prepare with actions
|
// Prepare with actions
|
||||||
[_objects, _controllers, _images, _names, _duration, _setName, _selection] call FUNC(createSlideshow);
|
[_objects, _controllers, _images, _names, _duration, _setName, _selection] call FUNC(createSlideshow);
|
||||||
|
@ -27,7 +27,7 @@ GVAR(AllMarkerNames) = [];
|
|||||||
// delete markers
|
// delete markers
|
||||||
{
|
{
|
||||||
deleteMarkerLocal _x;
|
deleteMarkerLocal _x;
|
||||||
} count GVAR(AllMarkerNames);
|
} forEach GVAR(AllMarkerNames);
|
||||||
|
|
||||||
// reset the array
|
// reset the array
|
||||||
GVAR(AllMarkerNames) = [];
|
GVAR(AllMarkerNames) = [];
|
||||||
@ -58,8 +58,7 @@ GVAR(AllMarkerNames) = [];
|
|||||||
};
|
};
|
||||||
|
|
||||||
GVAR(AllMarkerNames) pushBack _markerName;
|
GVAR(AllMarkerNames) pushBack _markerName;
|
||||||
nil
|
|
||||||
};
|
};
|
||||||
} count allUnits;
|
} forEach allUnits;
|
||||||
};
|
};
|
||||||
}, 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler;
|
}, 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -26,7 +26,7 @@ params ["_unit", "_ladder"];
|
|||||||
|
|
||||||
{
|
{
|
||||||
_ladder animate [_x, 0];
|
_ladder animate [_x, 0];
|
||||||
} count __ANIMS;
|
} forEach __ANIMS;
|
||||||
|
|
||||||
[_unit, "amovpercmstpslowwrfldnon_player_idlesteady03", 2] call EFUNC(common,doAnimation);
|
[_unit, "amovpercmstpslowwrfldnon_player_idlesteady03", 2] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ _ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of playe
|
|||||||
_ladder animate ["rotate", 0];
|
_ladder animate ["rotate", 0];
|
||||||
{
|
{
|
||||||
_ladder animate [_x, 1];
|
_ladder animate [_x, 1];
|
||||||
} count ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
|
} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
|
||||||
|
|
||||||
GVAR(ladder) = _ladder;
|
GVAR(ladder) = _ladder;
|
||||||
GVAR(cancelTime) = CBA_missionTime + 1; // Workaround to prevent accidental canceling
|
GVAR(cancelTime) = CBA_missionTime + 1; // Workaround to prevent accidental canceling
|
||||||
|
@ -35,8 +35,7 @@ GVAR(adjustPFH) = [{
|
|||||||
|
|
||||||
{
|
{
|
||||||
_tripod animate [_x, 1 - GVAR(height)];
|
_tripod animate [_x, 1 - GVAR(height)];
|
||||||
} count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
} forEach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
||||||
|
|
||||||
}, 0, [_unit, _tripod]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_unit, _tripod]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
|
[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
|
||||||
|
@ -34,7 +34,7 @@ if (stance _unit == "STAND") then {
|
|||||||
|
|
||||||
{
|
{
|
||||||
_tripod animate [_x, 0.5];
|
_tripod animate [_x, 0.5];
|
||||||
} count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
} forEach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
||||||
|
|
||||||
[{
|
[{
|
||||||
(_this select 0) params ["_tripod", "_direction", "_position"];
|
(_this select 0) params ["_tripod", "_direction", "_position"];
|
||||||
|
@ -21,10 +21,8 @@ GVAR(GrenadesNonFrag) = [];
|
|||||||
private _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive");
|
private _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive");
|
||||||
|
|
||||||
([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x;
|
([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x;
|
||||||
false
|
} forEach _magazines;
|
||||||
} count _magazines;
|
} forEach getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
||||||
false
|
|
||||||
} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
|
||||||
|
|
||||||
#include "initSettings.inc.sqf"
|
#include "initSettings.inc.sqf"
|
||||||
|
|
||||||
|
@ -37,8 +37,7 @@ private _grenades = [];
|
|||||||
if (_x in _magazines) then {
|
if (_x in _magazines) then {
|
||||||
_grenades pushBack _x;
|
_grenades pushBack _x;
|
||||||
};
|
};
|
||||||
false
|
} forEach ([GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type);
|
||||||
} count ([GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type);
|
|
||||||
|
|
||||||
// abort if no grenades are available
|
// abort if no grenades are available
|
||||||
if (_grenades isEqualTo []) exitWith {false};
|
if (_grenades isEqualTo []) exitWith {false};
|
||||||
|
@ -58,8 +58,7 @@ if (_terrainEffectEnabled) then {
|
|||||||
if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith {
|
if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith {
|
||||||
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
_newWindSpeed = cos(_x * 9) * _windSpeed;
|
||||||
};
|
};
|
||||||
nil
|
} forEach [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||||
} count [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
||||||
_windSpeed = _newWindSpeed;
|
_windSpeed = _newWindSpeed;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -81,8 +80,7 @@ if (_obstacleEffectEnabled) then {
|
|||||||
if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith {
|
if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith {
|
||||||
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
_newWindSpeed = cos(_x * 2) * _windSpeed;
|
||||||
};
|
};
|
||||||
nil
|
} forEach [0, 5, 10, 15, 20, 25, 30, 35, 40, 45];
|
||||||
} count [0, 5, 10, 15, 20, 25, 30, 35, 40, 45];
|
|
||||||
_windSpeed = _newWindSpeed;
|
_windSpeed = _newWindSpeed;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user