From 675b76f569b1d2bd0dd74f8919fc6526af6ad249 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 1 May 2015 18:12:24 -0500 Subject: [PATCH] Privates - Interaction --- addons/interaction/XEH_postInit.sqf | 1 + addons/interaction/functions/fnc_MoveDown.sqf | 2 ++ addons/interaction/functions/fnc_addPassengerActions.sqf | 2 +- addons/interaction/functions/fnc_addPassengersActions.sqf | 3 ++- addons/interaction/functions/fnc_applyButtons.sqf | 2 +- addons/interaction/functions/fnc_getDoorAnimations.sqf | 2 +- addons/interaction/functions/fnc_moduleInteraction.sqf | 2 ++ addons/interaction/functions/fnc_openDoor.sqf | 1 + addons/interaction/functions/fnc_openSelectMenu.sqf | 2 ++ addons/interaction/functions/fnc_push.sqf | 3 +-- addons/interaction/functions/fnc_removeTag.sqf | 1 + addons/interaction/functions/fnc_showMouseHint.sqf | 2 +- addons/interaction/functions/fnc_updateTooltipPosition.sqf | 2 ++ 13 files changed, 18 insertions(+), 7 deletions(-) diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 6417043df2..e828c60912 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -15,6 +15,7 @@ if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; // restore global fire teams for JIP +private ["_team"]; { _team = _x getVariable [QGVAR(assignedFireTeam), ""]; if (_team != "") then {_x assignTeam _team}; diff --git a/addons/interaction/functions/fnc_MoveDown.sqf b/addons/interaction/functions/fnc_MoveDown.sqf index eac30e4008..9c916aacbe 100644 --- a/addons/interaction/functions/fnc_MoveDown.sqf +++ b/addons/interaction/functions/fnc_MoveDown.sqf @@ -16,6 +16,8 @@ */ #include "script_component.hpp" +private["_action", "_color", "_count", "_ctrl", "_current", "_dlgInteractionDialog", "_i", "_index", "_infoText", "_player", "_target", "_top", "_vehicle"]; + #define CLAMP(x,low,high) (if(x > high)then{high}else{if(x < low)then{low}else{x}}) if (isNil QGVAR(MainButton)) exitWith{}; if (isNil QGVAR(Buttons)) exitWith{}; diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index 82e3b3b4fb..ae58fe195e 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -16,7 +16,7 @@ EXPLODE_3_PVT(_this,_vehicle,_player,_parameters); -private ["_unit","_actions"]; +private ["_unit", "_actions", "_actionTrees", "_varName"]; _unit = _parameters select 0; _varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit]; diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index c446be3737..5a7c5a4eb1 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -20,8 +20,9 @@ private ["_actions"]; _actions = []; { + private ["_unit"]; _unit = _x; - if (_x != _player) then { + if (_unit != _player) then { _actions pushBack [ [ diff --git a/addons/interaction/functions/fnc_applyButtons.sqf b/addons/interaction/functions/fnc_applyButtons.sqf index be35b34877..e87cfc5e9c 100644 --- a/addons/interaction/functions/fnc_applyButtons.sqf +++ b/addons/interaction/functions/fnc_applyButtons.sqf @@ -2,7 +2,7 @@ #include "script_component.hpp" -private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon"]; +private ["_object", "_actions", "_dlgInteractionDialog", "_ctrlInteractionDialog", "_index", "_ctrlInteractionDialogIcon", "_a", "_action", "_count"]; _object = GVAR(Target); _actions = GVAR(Buttons); diff --git a/addons/interaction/functions/fnc_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf index ca59ec177c..cd3bc85c50 100644 --- a/addons/interaction/functions/fnc_getDoorAnimations.sqf +++ b/addons/interaction/functions/fnc_getDoorAnimations.sqf @@ -1,7 +1,7 @@ // by commy2 #include "script_component.hpp" -private ["_house", "_door", "_animations", "_lockedVariable"]; +private ["_house", "_door", "_animations", "_lockedVariable", "_index"]; _house = _this select 0; _door = _this select 1; diff --git a/addons/interaction/functions/fnc_moduleInteraction.sqf b/addons/interaction/functions/fnc_moduleInteraction.sqf index 37b7bacba5..6cc70185ec 100644 --- a/addons/interaction/functions/fnc_moduleInteraction.sqf +++ b/addons/interaction/functions/fnc_moduleInteraction.sqf @@ -11,6 +11,8 @@ */ #include "script_component.hpp" +private["_activated", "_logic"]; + _logic = _this select 0; _activated = _this select 2; diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index e175e752cb..25b0cc7cab 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -26,6 +26,7 @@ GVAR(isOpeningDoor) = true; playSound "ACE_Sound_Click"; [_house, _animations] spawn { + private ["_house", "_animations", "_phase", "_position", "_time", "_usedMouseWheel"]; _house = _this select 0; _animations = _this select 1; diff --git a/addons/interaction/functions/fnc_openSelectMenu.sqf b/addons/interaction/functions/fnc_openSelectMenu.sqf index de5459f88c..dad9c424d2 100644 --- a/addons/interaction/functions/fnc_openSelectMenu.sqf +++ b/addons/interaction/functions/fnc_openSelectMenu.sqf @@ -23,6 +23,8 @@ */ #include "script_component.hpp" +private["_action", "_count", "_customActions", "_i"]; + if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) then { GVAR(SelectAccept) = _this select 1; GVAR(SelectCancel) = _this select 2; diff --git a/addons/interaction/functions/fnc_push.sqf b/addons/interaction/functions/fnc_push.sqf index f52a9d40de..defefba079 100644 --- a/addons/interaction/functions/fnc_push.sqf +++ b/addons/interaction/functions/fnc_push.sqf @@ -12,8 +12,7 @@ */ #include "script_component.hpp" -_boat = _this select 0; -_velocity = _this select 1; +PARAMS_2(_boat,_velocity); if !(local _boat) exitWith { [_this, QUOTE(FUNC(push)), _boat] call EFUNC(common,execRemoteFnc); diff --git a/addons/interaction/functions/fnc_removeTag.sqf b/addons/interaction/functions/fnc_removeTag.sqf index 0894520149..552b030dc5 100644 --- a/addons/interaction/functions/fnc_removeTag.sqf +++ b/addons/interaction/functions/fnc_removeTag.sqf @@ -2,6 +2,7 @@ #include "script_component.hpp" 0 spawn { + private["_index", "_name"]; waitUntil {player getVariable ["ACE_Name", ""] != ""}; _name = player getVariable ["ACE_Name", ""]; diff --git a/addons/interaction/functions/fnc_showMouseHint.sqf b/addons/interaction/functions/fnc_showMouseHint.sqf index 5cb96a0eae..0cf8104901 100644 --- a/addons/interaction/functions/fnc_showMouseHint.sqf +++ b/addons/interaction/functions/fnc_showMouseHint.sqf @@ -20,7 +20,7 @@ #define GUI_GRID_W (0.025) #define GUI_GRID_H (0.04) -private ["_leftClick", "_rightClick", "_scroll"]; +private ["_leftClick", "_rightClick", "_scroll", "_display"]; _leftClick = _this select 0; _rightClick = _this select 1; _scroll = ""; diff --git a/addons/interaction/functions/fnc_updateTooltipPosition.sqf b/addons/interaction/functions/fnc_updateTooltipPosition.sqf index 27148c5aa3..4433d7ecc3 100644 --- a/addons/interaction/functions/fnc_updateTooltipPosition.sqf +++ b/addons/interaction/functions/fnc_updateTooltipPosition.sqf @@ -1,6 +1,8 @@ // by commy2 #include "script_component.hpp" +private["_ctrl"]; + disableSerialization; _ctrl = ctrlParent (_this select 0) displayCtrl 40;