mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup
This commit is contained in:
parent
007859d42e
commit
f6c752045c
@ -19,7 +19,7 @@
|
|||||||
params ["_attachToVehicle","_unit"],
|
params ["_attachToVehicle","_unit"],
|
||||||
TRACE_2("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), []];
|
_attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ private ["_attachedList"];
|
|||||||
_attachedList = _unit getVariable [QGVAR(attached), []];
|
_attachedList = _unit getVariable [QGVAR(attached), []];
|
||||||
if ((count _attachedList) == 0) exitWith {};
|
if ((count _attachedList) == 0) exitWith {};
|
||||||
|
|
||||||
(_attachedList select 0) params ["_xObject", "_xItemName"];
|
(_attachedList select 0) params ["_xObject"];
|
||||||
if (!isNull _xObject) then {
|
if (!isNull _xObject) then {
|
||||||
detach _xObject;
|
detach _xObject;
|
||||||
_xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
_xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
* Handles when vehicle or man is killed.
|
* Handles when vehicle or man is killed.
|
||||||
|
* Note: Runs where unit is local.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: DeadVehicle <OBJECT>
|
* 0: DeadVehicle <OBJECT>
|
||||||
@ -15,9 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!isServer) exitWith {};
|
|
||||||
|
|
||||||
params ["_deadUnit"];
|
params ["_deadUnit"];
|
||||||
|
TRACE_1("params",_deadUnit);
|
||||||
|
|
||||||
private ["_attachedList"];
|
private ["_attachedList"];
|
||||||
|
|
||||||
@ -26,7 +26,8 @@ _attachedList = _deadUnit getVariable [QGVAR(attached), []];
|
|||||||
if ((count _attachedList) == 0) exitWith {};
|
if ((count _attachedList) == 0) exitWith {};
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_xObject", "_xItemName"];
|
_x params ["_xObject"];
|
||||||
|
TRACE_2("detaching",_xObject,_deadUnit);
|
||||||
detach _xObject;
|
detach _xObject;
|
||||||
} forEach _attachedList;
|
} forEach _attachedList;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user