diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 3bb54eee16..45b1c0a336 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -62,6 +62,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment _actionID = _unit addAction [format ["%1", localize "STR_ACE_Attach_CancelAction"], {GVAR(placeAction) = 0}]; [{ + private "_startingPosition"; PARAMS_2(_args,_pfID); EXPLODE_7_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_tempObject,_onAtachText,_actionID); diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index d0930dc069..18071092d5 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -19,7 +19,7 @@ PARAMS_3(_attachToVehicle,_player,_args); -private ["_itemName", "_attachLimit", "_attachedObjects"]; +private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"]; _itemName = [_args, 0, ""] call CBA_fnc_defaultParam; _attachLimit = [6, 1] select (_player == _attachToVehicle); diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 99ac646013..a56936301d 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -18,7 +18,7 @@ PARAMS_2(_attachToVehicle,_unit); -private ["_attachedObjects", "_attachedItems"]; +private ["_attachedObjects", "_attachedItems", "_itemDisplayName"]; _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []]; diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf index 3594e10bd6..fb432146be 100644 --- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf +++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf @@ -17,6 +17,7 @@ */ #include "script_component.hpp" +private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"]; PARAMS_2(_target,_player); _listed = []; diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 1894d68f23..3f5cf53994 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -13,11 +13,7 @@ */ #include "script_component.hpp" -private ["_unit", "_target"]; - -_unit = _this select 0; -_target = _this select 1; -_backpack = _this select 2; +PARAMS_3(_unit,_target,_backpack); // do cam shake if the target is the player if ([_target] call EFUNC(common,isPlayer)) then { diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index 651edbcf86..f91f24025e 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -7,6 +7,7 @@ if (isServer) then { addMissionEventHandler ["HandleDisconnect", { PARAMS_1(_disconnectedPlayer); + private "_escortedUnit"; _escortedUnit = _disconnectedPlayer getVariable [QGVAR(escortedUnit), objNull]; if ((!isNull _escortedUnit) && {(attachedTo _escortedUnit) == _disconnectedPlayer}) then { detach _escortedUnit; diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index 9fd65a130d..97ecd98a0a 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -18,6 +18,7 @@ #include "script_component.hpp" PARAMS_3(_unit,_target,_vehicle); +private "_objects"; if (isNull _target) then { _objects = attachedObjects _unit; diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index 0506b0cc17..bf0e04cd6a 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -18,6 +18,7 @@ #include "script_component.hpp" PARAMS_3(_logic,_units,_activated); +private ["_bisMouseOver", "_mouseOverObject"]; if (!_activated) exitWith {}; diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 5f134ab03b..bd141988bb 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -50,6 +50,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) + private "_animChangedEHID"; _animChangedEHID = _unit addEventHandler ["AnimChanged", { PARAMS_2(_unit,_newAnimation); if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { @@ -66,6 +67,7 @@ if (_state) then { [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH + private "_animChangedEHID"; _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; _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 d774e7f6e0..22de70921d 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -48,6 +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) + private "_animChangedEHID"; _animChangedEHID = _unit addEventHandler ["AnimChanged", { PARAMS_2(_unit,_newAnimation); if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { @@ -63,6 +64,7 @@ if (_state) then { [_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus); //remove AnimChanged EH + private "_animChangedEHID"; _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; _unit removeEventHandler ["AnimChanged", _animChangedEHID]; _unit setVariable [QGVAR(surrenderAnimEHID), -1]; diff --git a/addons/disarming/functions/fnc_canBeDisarmed.sqf b/addons/disarming/functions/fnc_canBeDisarmed.sqf index 04171a900d..25ec884919 100644 --- a/addons/disarming/functions/fnc_canBeDisarmed.sqf +++ b/addons/disarming/functions/fnc_canBeDisarmed.sqf @@ -17,6 +17,8 @@ PARAMS_1(_target); +private ["_animationStateCfgMoves", "_putDownAnim"]; + //Check animationState for putDown anim //This ensures the unit doesn't have to actualy do any animation to drop something //This should always be true for the 3 possible status effects that allow disarming diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 24ab96a2cf..2cb3e89b5d 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -20,6 +20,9 @@ #define TIME_MAX_WAIT 5 +private ["_fncSumArray", "_return", "_holder", "_dropPos", "_targetMagazinesStart", "_holderMagazinesStart", "_xClassname", "_xAmmo", "_targetMagazinesEnd", "_holderMagazinesEnd", "_holderItemsStart", "_targetItemsStart", "_addToCrateClassnames", "_addToCrateCount", "_index", "_holderItemsEnd", "_targetItemsEnd", "_holderIsEmpty"]; + + PARAMS_3(_caller,_target,_listOfItemsToRemove); DEFAULT_PARAM(3,_doNotDropAmmo,false); //By default units drop all weapon mags when dropping a weapon @@ -154,6 +157,8 @@ if (_holderIsEmpty) then { //Start the PFEH to do the actions (which could take >1 frame) [{ + private ["_needToRemoveWeapon", "_needToRemoveMagazines", "_needToRemoveBackpack", "_needToRemoveVest", "_needToRemoveUniform", "_error", "_magsToPickup", "_index", "_magazinesInHolder"]; + PARAMS_2(_args,_pfID); EXPLODE_8_PVT(_args,_caller,_target,_listOfItemsToRemove,_holder,_holderIsEmpty,_maxWaitTime,_doNotDropAmmo,_startingMagazines); diff --git a/addons/disarming/functions/fnc_eventTargetStart.sqf b/addons/disarming/functions/fnc_eventTargetStart.sqf index c91f717e2a..316ec2b656 100644 --- a/addons/disarming/functions/fnc_eventTargetStart.sqf +++ b/addons/disarming/functions/fnc_eventTargetStart.sqf @@ -20,6 +20,8 @@ PARAMS_3(_caller,_target,_listOfObjectsToRemove); +private "_itemsToAdd"; + _itemsToAdd = []; { if (_x == (uniform _target)) then { diff --git a/addons/disarming/functions/fnc_getAllGearUnit.sqf b/addons/disarming/functions/fnc_getAllGearUnit.sqf index d07f40c972..a319c006ee 100644 --- a/addons/disarming/functions/fnc_getAllGearUnit.sqf +++ b/addons/disarming/functions/fnc_getAllGearUnit.sqf @@ -17,6 +17,8 @@ PARAMS_1(_target); +private ["_allItems", "_classnamesCount", "_index", "_uniqueClassnames"]; + _allItems = ((weapons _target) + (magazines _target) + (items _target) + (assignedItems _target)); if ((backpack _target) != "") then { diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 6da123b831..832f32ced5 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -28,6 +28,7 @@ ] PARAMS_2(_caller,_target); +private "_display"; //Sanity Checks if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");}; @@ -59,6 +60,7 @@ GVAR(disarmTarget) = _target; //Setup PFEH [{ + private ["_groundContainer", "_targetContainer", "_playerName", "_rankPicture", "_rankIndex", "_targetUniqueItems", "_holderUniqueItems"]; disableSerialization; EXPLODE_2_PVT(_this,_args,_pfID); EXPLODE_3_PVT(_args,_player,_target,_display); @@ -71,6 +73,7 @@ GVAR(disarmTarget) = _target; GVAR(disarmTarget) = objNull; if (!isNull _display) then {closeDialog 0;}; //close dialog if still open } else { + _groundContainer = _display displayCtrl 632; _targetContainer = _display displayCtrl 633; _playerName = _display displayCtrl 111; diff --git a/addons/disarming/functions/fnc_showItemsInListbox.sqf b/addons/disarming/functions/fnc_showItemsInListbox.sqf index e040233b82..5c809de4a2 100644 --- a/addons/disarming/functions/fnc_showItemsInListbox.sqf +++ b/addons/disarming/functions/fnc_showItemsInListbox.sqf @@ -19,7 +19,7 @@ disableSerialization; PARAMS_2(_listBoxCtrl,_itemsCountArray); -private "_classname"; +private ["_classname", "_count", "_displayName", "_picture"]; { _displayName = ""; diff --git a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf index 779a5e39ba..e1753f390a 100644 --- a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf +++ b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf @@ -20,7 +20,7 @@ */ #include "script_component.hpp" -private ["_problem", "_beginingArray"]; +private ["_problem", "_beginingArray", "_index"]; PARAMS_4(_startA,_endA,_startB,_endB); diff --git a/addons/disposable/XEH_postInitClient.sqf b/addons/disposable/XEH_postInitClient.sqf index 1fe598137f..c20dfa886b 100644 --- a/addons/disposable/XEH_postInitClient.sqf +++ b/addons/disposable/XEH_postInitClient.sqf @@ -5,7 +5,6 @@ #include "script_component.hpp" ["inventoryDisplayLoaded",{ - _player = ACE_player; - [_player] call FUNC(takeLoadedATWeapon); - [_player, (_this select 0)] call FUNC(updateInventoryDisplay); + [ACE_player] call FUNC(takeLoadedATWeapon); + [ACE_player, (_this select 0)] call FUNC(updateInventoryDisplay); }] call EFUNC(common,addEventHandler); \ No newline at end of file