Delay calling addCuratorEditableObjects for a frame

Fixes createVehicle not always being added on dedicated server.
This commit is contained in:
PabstMirror 2016-03-30 10:26:33 -05:00
parent ada519a59c
commit 6f412c312a

View File

@ -13,12 +13,13 @@
#include "script_component.hpp"
if (!isServer) exitWith {};
params ["_object"];
if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {};
{
_x addCuratorEditableObjects [[_object], true];
}forEach allCurators;
[{
TRACE_1("Delayed addCuratorEditableObjects",_this);
{
_x addCuratorEditableObjects [[_this], true];
} forEach allCurators;
}, _object] call EFUNC(common,execNextFrame);