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
|
2015-09-26 01:16:55 +00:00
|
|
|
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
|
|
|
|
|
|
|
|
// Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting.
|
|
|
|
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
|
|
|
["playerInventoryChanged", {_this call FUNC(handlePlayerInventoryChanged)}] call EFUNC(common,addEventhandler);
|
|
|
|
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
|
|
|
|
|
|
|
// handle waking up dragged unit and falling unconscious while dragging
|
|
|
|
["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
|
2015-06-02 18:06:56 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
//@todo Captivity?
|