mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Delay calling addCuratorEditableObjects for a frame
Fixes createVehicle not always being added on dedicated server.
This commit is contained in:
parent
ada519a59c
commit
6f412c312a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user