diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index ec389b5c25..05c625b374 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -19,7 +19,7 @@ params ["_attachToVehicle","_unit"], TRACE_2("params",_attachToVehicle,_unit); -private ["_attachedList", "_itemDisplayName", "_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"]; +private ["_attachedList", "_itemDisplayName", "_attachedObject", "_attachedIndex", "_itemName", "_minDistance"]; _attachedList = _attachToVehicle getVariable [QGVAR(attached), []]; diff --git a/addons/attach/functions/fnc_handleGetIn.sqf b/addons/attach/functions/fnc_handleGetIn.sqf index 415fdddf8a..b7b2997081 100644 --- a/addons/attach/functions/fnc_handleGetIn.sqf +++ b/addons/attach/functions/fnc_handleGetIn.sqf @@ -27,7 +27,7 @@ private ["_attachedList"]; _attachedList = _unit getVariable [QGVAR(attached), []]; if ((count _attachedList) == 0) exitWith {}; -(_attachedList select 0) params ["_xObject", "_xItemName"]; +(_attachedList select 0) params ["_xObject"]; if (!isNull _xObject) then { detach _xObject; _xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]); diff --git a/addons/attach/functions/fnc_handleKilled.sqf b/addons/attach/functions/fnc_handleKilled.sqf index 5fb33c2abe..355360d95f 100644 --- a/addons/attach/functions/fnc_handleKilled.sqf +++ b/addons/attach/functions/fnc_handleKilled.sqf @@ -1,6 +1,7 @@ /* * Author: PabstMirror - * Handles when vehicle or man is killed. + * Handles when vehicle or man is killed. + * Note: Runs where unit is local. * * Arguments: * 0: DeadVehicle @@ -15,9 +16,8 @@ */ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_deadUnit"]; +TRACE_1("params",_deadUnit); private ["_attachedList"]; @@ -26,7 +26,8 @@ _attachedList = _deadUnit getVariable [QGVAR(attached), []]; if ((count _attachedList) == 0) exitWith {}; { - _x params ["_xObject", "_xItemName"]; + _x params ["_xObject"]; + TRACE_2("detaching",_xObject,_deadUnit); detach _xObject; } forEach _attachedList;