Restore delay in modules

This commit is contained in:
PabstMirror 2016-02-20 09:39:15 -06:00
parent 6523b715fe
commit b9cf5817b9
2 changed files with 14 additions and 6 deletions

View File

@ -24,8 +24,12 @@ TRACE_3("params",_logic,_units,_activated);
if (!_activated) exitWith {};
if (!isServer) exitWith {};
{
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
deleteVehicle _logic;

View File

@ -24,8 +24,12 @@ TRACE_3("params",_logic,_units,_activated);
if (!_activated) exitWith {};
if (!isServer) exitWith {};
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
deleteVehicle _logic;