ACE3/addons/attach/functions/fnc_detachDelayFix.sqf

21 lines
482 B
Plaintext
Raw Normal View History

2015-01-13 09:06:24 +00:00
/*
Author: Pabst Mirror
Description:
Waits then deletes the object. Fixes IR_Grenade's effect not disapearing.
Parameters:
0: ARRAY - [OBJECT - item, NUMBER - time to wait until]
1: NUMBER - CBA's PerFrameHandler ID
*/
_attachedItem = (_this select 0) select 0;
_waitUntilTime = (_this select 0) select 1;
if (time < _waitUntilTime) exitWith {};
deleteVehicle _attachedItem;
//Remove the frame handler
[(_this select 1)] call cba_fnc_removePerFrameHandler;