Move the function that prevents firing while the interact_menu is open to the interact_menu pbo

This commit is contained in:
esteldunedain 2015-04-15 01:20:20 -03:00
parent d6a293c573
commit a9f44530c9
5 changed files with 8 additions and 12 deletions

View File

@ -50,3 +50,6 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
GVAR(actionSelected) = false;
[] call FUNC(keyUp);
}] call EFUNC(common,addEventhandler);
// disable firing while the interact menu is is is opened
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventHandler);

View File

@ -9,6 +9,7 @@ PREP(compileMenuSelfAction);
PREP(collectActiveActionTree);
PREP(createAction);
PREP(findActionNode);
PREP(handlePlayerChanged);
PREP(isSubPath);
PREP(keyDown);
PREP(keyUp);

View File

@ -1,21 +1,17 @@
/*
* Author: commy2
*
* Disables firing while the menu is opened. Called from playerChanged eh.
*
* Argument:
* 0: New unit to add the addAction eh (Object)
* 1: Old unit to remove the addAction eh (String)
* 0: New unit to add the addAction eh <OBJECT>
* 1: Old unit to remove the addAction eh <STRING>
*
* Return value:
* NOPE
* None
*/
#include "script_component.hpp"
private ["_newUnit", "_oldUnit"];
_newUnit = _this select 0;
_oldUnit = _this select 1;
EXPLODE_2_PVT(_this,_newUnit,_oldUnit);
// add to new unit
private "_ehid";

View File

@ -74,6 +74,3 @@ GVAR(isOpeningDoor) = false;
[29, [false, false, false]], false] call cba_fnc_addKeybind;
["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition);
// disable firing while the interact menu is is is opened
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventHandler);

View File

@ -14,7 +14,6 @@ PREP(getDoor);
PREP(getDoorAnimations);
PREP(getDown);
PREP(getSelectedButton);
PREP(handlePlayerChanged);
PREP(hideMenu);
PREP(hideMouseHint);
PREP(isInRange);