ACE3/addons/zeus/functions/fnc_addObjectToCurator.sqf
PabstMirror 6f412c312a Delay calling addCuratorEditableObjects for a frame
Fixes createVehicle not always being added on dedicated server.
2016-03-30 10:26:33 -05:00

26 lines
477 B
Plaintext

/*
* Author: Glowbal
* Adds an object to curator upon spawn
*
* Arguments:
* Object <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_object"];
if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {};
[{
TRACE_1("Delayed addCuratorEditableObjects",_this);
{
_x addCuratorEditableObjects [[_this], true];
} forEach allCurators;
}, _object] call EFUNC(common,execNextFrame);