2015-06-02 17:30:50 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
if (isServer) then {
|
|
|
|
// Cancel deploy on hard disconnection. Function is identical to killed
|
|
|
|
addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleKilled)}];
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2015-06-02 17:30:50 +00:00
|
|
|
GVAR(sandBag) = objNull;
|
|
|
|
GVAR(deployPFH) = -1;
|
|
|
|
GVAR(deployDirection) = 0;
|
|
|
|
|
2015-06-02 18:06:56 +00:00
|
|
|
// Cancel deploy sandbag if interact menu opened
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
// Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting.
|
2016-06-21 23:39:20 +00:00
|
|
|
["unit", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
|
|
|
["loadout", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addPlayerEventHandler;
|
|
|
|
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
// handle waking up dragged unit and falling unconscious while dragging
|
2016-06-03 18:57:21 +00:00
|
|
|
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
2015-06-02 18:06:56 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
//@todo Captivity?
|