Skip to content

Commit

Permalink
Merge pull request #3640 from acemod/fixZeusAutoAdd
Browse files Browse the repository at this point in the history
Delay calling addCuratorEditableObjects for a frame
  • Loading branch information
PabstMirror committed Mar 31, 2016
2 parents 0768039 + 6f412c3 commit e104b0a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions addons/zeus/functions/fnc_addObjectToCurator.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit e104b0a

Please sign in to comment.