mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
415d2f685c
FUNC -> LINKFUNC
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
if (isServer) then {
|
|
// Cancel deploy on hard disconnection. Function is identical to killed
|
|
addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleKilled)}];
|
|
};
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
GVAR(sandBag) = objNull;
|
|
GVAR(deployPFH) = -1;
|
|
GVAR(deployDirection) = 0;
|
|
|
|
// Cancel deploy sandbag if interact menu opened
|
|
["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler;
|
|
|
|
// Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting.
|
|
["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
|
|
["loadout", LINKFUNC(handlePlayerInventoryChanged)] call CBA_fnc_addPlayerEventHandler;
|
|
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler;
|
|
|
|
// handle waking up dragged unit and falling unconscious while dragging
|
|
["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler;
|
|
|
|
//@todo Captivity?
|