mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#2541 - Attach getIn/Out run on local unit
This commit is contained in:
parent
079d88ded7
commit
cf8a7f742e
@ -17,11 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!isServer) exitWith {};
|
|
||||||
|
|
||||||
params ["", "", "_unit"];
|
params ["", "", "_unit"];
|
||||||
TRACE_1("params",_unit);
|
TRACE_1("params",_unit);
|
||||||
|
|
||||||
|
if (!local _unit) exitWith {};
|
||||||
|
|
||||||
private ["_attachedList"];
|
private ["_attachedList"];
|
||||||
|
|
||||||
_attachedList = _unit getVariable [QGVAR(attached), []];
|
_attachedList = _unit getVariable [QGVAR(attached), []];
|
||||||
@ -29,9 +29,14 @@ if ((count _attachedList) == 0) exitWith {};
|
|||||||
|
|
||||||
(_attachedList select 0) params ["_xObject"];
|
(_attachedList select 0) params ["_xObject"];
|
||||||
if (!isNull _xObject) then {
|
if (!isNull _xObject) then {
|
||||||
|
TRACE_1("detaching and moving attached light",_xObject);
|
||||||
detach _xObject;
|
detach _xObject;
|
||||||
_xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
_xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
||||||
[{deleteVehicle (_this select 0)}, [_xObject], 2] call EFUNC(common,waitAndExecute);
|
[{
|
||||||
|
params ["_detachedLight"];
|
||||||
|
TRACE_1("delayed delete",_detachedLight);
|
||||||
|
deleteVehicle _detachedLight;
|
||||||
|
}, [_xObject], 2] call EFUNC(common,waitAndExecute);
|
||||||
(_attachedList select 0) set [0, objNull];
|
(_attachedList select 0) set [0, objNull];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!isServer) exitWith {};
|
|
||||||
|
|
||||||
params ["", "", "_unit"];
|
params ["", "", "_unit"];
|
||||||
TRACE_1("params",_unit);
|
TRACE_1("params",_unit);
|
||||||
|
|
||||||
|
if (!local _unit) exitWith {};
|
||||||
|
|
||||||
private ["_attachedList"];
|
private ["_attachedList"];
|
||||||
|
|
||||||
_attachedList = _unit getVariable [QGVAR(attached), []];
|
_attachedList = _unit getVariable [QGVAR(attached), []];
|
||||||
|
Loading…
Reference in New Issue
Block a user