2015-03-16 18:25:29 +00:00
|
|
|
// by PabstMirror, commy2
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
if (isServer) then {
|
|
|
|
// release object on hard disconnection. Function is identical to killed
|
|
|
|
addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleKilled)}];
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2015-03-18 13:14:16 +00:00
|
|
|
if (isNil "ACE_maxWeightDrag") then {
|
|
|
|
ACE_maxWeightDrag = 800;
|
|
|
|
};
|
|
|
|
|
|
|
|
if (isNil "ACE_maxWeightCarry") then {
|
|
|
|
ACE_maxWeightCarry = 600;
|
2015-03-16 18:25:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
["isNotDragging", {!((_this select 0) getVariable [QGVAR(isDragging), false])}] call EFUNC(common,addCanInteractWithCondition);
|
2015-03-17 14:42:25 +00:00
|
|
|
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
|
2015-03-17 12:47:07 +00:00
|
|
|
|
|
|
|
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
|
2016-06-21 23:39:20 +00:00
|
|
|
["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addEventHandler;
|
|
|
|
["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
|
|
|
["weapon", FUNC(handlePlayerWeaponChanged)] call CBA_fnc_addEventHandler;
|
2015-03-24 18:07:39 +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-03-24 18:07:39 +00:00
|
|
|
|
|
|
|
//@todo Captivity?
|