diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 0bc2e85c52..a4788db057 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -56,7 +56,7 @@ if (_state) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) - local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; if (_animChangedEHID != -1) then { TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; @@ -92,7 +92,7 @@ if (_state) then { [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH - local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(handcuffAnimEHID), -1]; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 171455f3b1..5af4454472 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -48,7 +48,7 @@ if (_state) then { if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then { //Adds an animation changed eh //If we get a change in animation then redo the animation (handles people vaulting to break the animation chain) - local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; if (_animChangedEHID != -1) then { TRACE_1("removing animChanged EH",_animChangedEHID); _unit removeEventHandler ["AnimChanged", _animChangedEHID]; @@ -68,7 +68,7 @@ if (_state) then { [_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH - local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; + private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(surrenderAnimEHID), -1]; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 032b6148be..2c4a78254a 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -13,7 +13,7 @@ //Handle the waitAndExec array: while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do { - local _entry = GVAR(waitAndExecArray) deleteAt 0; + private _entry = GVAR(waitAndExecArray) deleteAt 0; (_entry select 2) call (_entry select 1); }; @@ -29,7 +29,7 @@ GVAR(nextFrameNo) = diag_frameno + 1; //Handle the waitUntilAndExec array: - local _deleted = 0; + private _deleted = 0; { // if condition is satisifed call statement if ((_x select 2) call (_x select 0)) then { diff --git a/addons/common/functions/fnc_dumpArray.sqf b/addons/common/functions/fnc_dumpArray.sqf index 010736d3a9..026b08501e 100644 --- a/addons/common/functions/fnc_dumpArray.sqf +++ b/addons/common/functions/fnc_dumpArray.sqf @@ -18,7 +18,7 @@ params ["_var", ["_depth", 0, [0]]]; -local _pad = ""; +private _pad = ""; for "_i" from 0 to _depth do { _pad = _pad + toString [9]; diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index 050f3e1c4f..20ee178bf1 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -local _vehicle = vehicle _unit; +private _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {[]}; scopeName "main"; diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index 124eed78a5..a67ad0b0d3 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -14,11 +14,11 @@ params ["_unit"]; -local _vehicle = vehicle _unit; +private _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {false}; -local _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false}; @@ -26,10 +26,10 @@ if (_unit == driver _vehicle) exitWith { getNumber (_config >> "forceHideDriver") == 0; // return }; -local _turret = [_unit] call FUNC(getTurretIndex); +private _turret = [_unit] call FUNC(getTurretIndex); if (_turret isEqualTo []) exitWith {false}; -local _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); +private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); getNumber (_turretConfig >> "forceHideGunner") == 0; // return diff --git a/addons/common/functions/fnc_selectWeaponMode.sqf b/addons/common/functions/fnc_selectWeaponMode.sqf index f255c63e98..582f6fd4b2 100644 --- a/addons/common/functions/fnc_selectWeaponMode.sqf +++ b/addons/common/functions/fnc_selectWeaponMode.sqf @@ -19,7 +19,7 @@ params ["_unit", "_muzzle", "_mode"]; -local _index = 0; +private _index = 0; while { _index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}} diff --git a/addons/common/functions/fnc_setAllGear.sqf b/addons/common/functions/fnc_setAllGear.sqf index e25045a685..2b5a2a9cc7 100644 --- a/addons/common/functions/fnc_setAllGear.sqf +++ b/addons/common/functions/fnc_setAllGear.sqf @@ -148,7 +148,7 @@ if (_backpack != "") then { _unit addBackpack _backpack; if (_clearBackpack) then { - local _backpackObject = unitBackpack _unit; + private _backpackObject = unitBackpack _unit; clearMagazineCargoGlobal _backpackObject; clearWeaponCargoGlobal _backpackObject; diff --git a/addons/common/functions/fnc_timePFH.sqf b/addons/common/functions/fnc_timePFH.sqf index 152eceee3f..e5366d331e 100644 --- a/addons/common/functions/fnc_timePFH.sqf +++ b/addons/common/functions/fnc_timePFH.sqf @@ -14,13 +14,13 @@ BEGIN_COUNTER(timePFH); -local _lastTickTime = ACE_diagTime; -local _lastGameTime = ACE_gameTime; +private _lastTickTime = ACE_diagTime; +private _lastGameTime = ACE_gameTime; ACE_gameTime = time; ACE_diagTime = diag_tickTime; -local _delta = ACE_diagTime - _lastTickTime; +private _delta = ACE_diagTime - _lastTickTime; if (ACE_gameTime <= _lastGameTime) then { TRACE_1("paused",_delta); diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 4958c8e02b..09a84ad151 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -95,7 +95,7 @@ GVAR(OldGlasses) = "#NULLSTRING"; }] call EFUNC(common,addEventHandler); // check goggles -local _fnc_checkGoggles = { +private _fnc_checkGoggles = { params ["_unit"]; if (GVAR(EffectsActive)) then { diff --git a/addons/goggles/functions/fnc_applyDirtEffect.sqf b/addons/goggles/functions/fnc_applyDirtEffect.sqf index b10ebc9668..c7ff386f9d 100644 --- a/addons/goggles/functions/fnc_applyDirtEffect.sqf +++ b/addons/goggles/functions/fnc_applyDirtEffect.sqf @@ -28,7 +28,7 @@ _effects set [DIRT, true]; SETGLASSES(_unit,_effects); if ([_unit] call FUNC(isGogglesVisible)) then { - local _dirtImage = getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_OverlayDirt"); + private _dirtImage = getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_OverlayDirt"); if (_dirtImage != "") then { GVAR(GogglesEffectsLayer) cutRsc ["RscACE_GogglesEffects", "PLAIN", 0.1, false]; diff --git a/addons/goggles/functions/fnc_applyDustEffect.sqf b/addons/goggles/functions/fnc_applyDustEffect.sqf index b052f3eae7..75f4853c01 100644 --- a/addons/goggles/functions/fnc_applyDustEffect.sqf +++ b/addons/goggles/functions/fnc_applyDustEffect.sqf @@ -54,7 +54,7 @@ GVAR(DustHandler) = [{ if (ACE_diagTime >= GETDUSTT(DTIME) + 3) then { SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2)); - local _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125); + private _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125); if !(_unit getVariable ["ACE_EyesDamaged", false]) then { GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [_amount, _amount, _amount, _amount], [1, 1, 1, 0]]; diff --git a/addons/goggles/functions/fnc_applyRainEffect.sqf b/addons/goggles/functions/fnc_applyRainEffect.sqf index 7e1260a453..01b2894d87 100644 --- a/addons/goggles/functions/fnc_applyRainEffect.sqf +++ b/addons/goggles/functions/fnc_applyRainEffect.sqf @@ -27,7 +27,7 @@ _fnc_underCover = { if (vehicle _unit != _unit && {!isTurnedOut _unit}) exitWith {true}; // looking up and no roof over head - local _position = eyePos _unit; + private _position = eyePos _unit; positionCameraToWorld [0, 0, 1] select 2 < (positionCameraToWorld [0, 0, 0] select 2) - 0.4 || {(lineIntersects [_position, _position vectorAdd [0, 0, 15], _unit])} // return }; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index 7dc088bc4e..bc8d0bafbf 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -86,7 +86,7 @@ if (_safe) exitWith {}; // apply rotor wash effect if (_rotorWash select 1 > 0) then { - local _scale = 0.7; + private _scale = 0.7; if (_rotorWash select 1 > 0) then { _scale = CLAMP(0.3 * (_rotorWash select 1),0.1,0.3); diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index 90260d07b3..793849822f 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -73,7 +73,7 @@ SETDUST(DTIME,ACE_diagTime); // apply dust effect if the amount of fired bullets is over the threshold if (GETDUSTT(DAMOUNT) < 2) then { - local _bulletsRequired = 100; + private _bulletsRequired = 100; if (isNumber (configFile >> _cloudType >> QGVAR(BulletCount))) then { _bulletsRequired = getNumber (configFile >> _cloudType >> QGVAR(BulletCount)); diff --git a/addons/goggles/functions/fnc_isDivingGoggles.sqf b/addons/goggles/functions/fnc_isDivingGoggles.sqf index ab5bb74269..ac86a09d2b 100644 --- a/addons/goggles/functions/fnc_isDivingGoggles.sqf +++ b/addons/goggles/functions/fnc_isDivingGoggles.sqf @@ -17,7 +17,7 @@ params ["_glasses"]; -local _config = configFile >> "CfgGlasses" >> _glasses; +private _config = configFile >> "CfgGlasses" >> _glasses; if (!isClass _config) exitWith {false}; diff --git a/addons/goggles/functions/fnc_isInRotorWash.sqf b/addons/goggles/functions/fnc_isInRotorWash.sqf index 5ddc59192a..319da3a875 100644 --- a/addons/goggles/functions/fnc_isInRotorWash.sqf +++ b/addons/goggles/functions/fnc_isInRotorWash.sqf @@ -21,11 +21,11 @@ params ["_unit", ["_radius", 15]]; -local _rotorWash = [false, 0]; +private _rotorWash = [false, 0]; { if (isEngineOn _x) then { - local _distance = _unit distance _x; + private _distance = _unit distance _x; // convert distance to 0...1 range, where 0 is the maximum radius _distance = 1 - _distance / _radius; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 6442911faa..ee90af64ad 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -29,7 +29,7 @@ GVAR(isOpeningDoor) = false; if (_unit == ACE_player) then { addCamShake [4, 0.5, 5]; - local _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0)); + private _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0)); [_message] call FUNC(displayTextStructured); }; }] call EFUNC(common,addEventHandler); diff --git a/addons/logistics_wirecutter/functions/fnc_isFence.sqf b/addons/logistics_wirecutter/functions/fnc_isFence.sqf index 449ffd7b77..878f44cf9a 100644 --- a/addons/logistics_wirecutter/functions/fnc_isFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_isFence.sqf @@ -19,9 +19,9 @@ params ["_object"]; TRACE_1("params",_object); -local _typeOf = typeOf _object; +private _typeOf = typeOf _object; -local _returnValue = if (_typeOf != "") then { +private _returnValue = if (_typeOf != "") then { //If the fence has configEntry we can check it directly (1 == (getNumber (configFile >> "CfgVehicles" >> _typeOf >> QGVAR(isFence)))); } else { diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index a5f0328181..f2fe4c1de9 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -47,7 +47,7 @@ if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/ //Backup method to detect weird selections/hitpoints if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith { if (_hitPointIndex < 0) exitWith {_selection}; - local _hitPoint = toLower configName ((configProperties [(configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints")]) select _hitPointIndex); + private _hitPoint = toLower configName ((configProperties [(configFile >> "CfgVehicles" >> (typeOf _unit) >> "HitPoints")]) select _hitPointIndex); TRACE_4("Weird sel/hit", _unit, _selection, _hitPointIndex, _hitPoint); if (_hitPoint in HEAD_HITPOINTS) exitWith {"head"}; diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf index 4435511b8f..ad1acabdb3 100644 --- a/addons/medical_menu/XEH_postInit.sqf +++ b/addons/medical_menu/XEH_postInit.sqf @@ -19,7 +19,7 @@ GVAR(pendingReopen) = false; ["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey), { - local _target = cursorTarget; + private _target = cursorTarget; if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player}; // Conditions: canInteract diff --git a/addons/medical_menu/functions/fnc_updateBodyImage.sqf b/addons/medical_menu/functions/fnc_updateBodyImage.sqf index afe84a59d3..1e8067a7f6 100644 --- a/addons/medical_menu/functions/fnc_updateBodyImage.sqf +++ b/addons/medical_menu/functions/fnc_updateBodyImage.sqf @@ -20,7 +20,7 @@ params ["_selectionBloodLoss", "_damaged", "_display"]; // Handle the body image coloring -local _availableSelections = [50, 51, 52, 53, 54, 55]; +private _availableSelections = [50, 51, 52, 53, 54, 55]; { private ["_red", "_green", "_blue"]; diff --git a/addons/reload/functions/fnc_canCheckAmmo.sqf b/addons/reload/functions/fnc_canCheckAmmo.sqf index 8fbb37c726..41a46ea465 100644 --- a/addons/reload/functions/fnc_canCheckAmmo.sqf +++ b/addons/reload/functions/fnc_canCheckAmmo.sqf @@ -25,7 +25,7 @@ if (_target isKindOf "StaticWeapon") exitWith { // no check ammo action on destroyed static weapons if (!alive _target) exitWith {false}; - local _found = false; + private _found = false; { if (_x select 2) exitWith { diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index d01e45dd50..a0ca2aa35e 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -37,7 +37,7 @@ if ( }; if (currentWeapon _unit != "") then { - local _index = 0; + private _index = 0; while { _index < 100 && {currentWeaponMode _unit != _activeWeaponMode}