ACE3/addons/explosives/XEH_postInit.sqf

35 lines
756 B
Plaintext
Raw Normal View History

/*
* Author: Garth 'L-H' de Wet
* Initialises the player object for the explosive system.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* None
*
* Public: No
*/
#include "script_component.hpp"
2015-05-27 19:09:06 +00:00
if !(hasInterface) exitWith {};
2015-05-27 19:09:06 +00:00
["interactMenuOpened", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;
GVAR(pfeh_running) = false;
GVAR(CurrentSpeedDial) = 0;
//Cancel placement if interact menu opened
["interactMenuOpened", {
if (GVAR(pfeh_running) && {!isNull (GVAR(Setup))}) then {
call FUNC(place_Cancel)
};
}] call EFUNC(common,addEventHandler);
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler);