mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3633 from acemod/fixdetonatescriptedexplosive
make FUNC(scriptedExplosive) work in scheduled env, ref #3621
This commit is contained in:
commit
ef83a667c1
@ -4,7 +4,7 @@
|
||||
* detonate editor-placed explosives.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Explosives objects to detonate <ARRAY>
|
||||
* 0: Explosives objects to detonate <OBJECT or ARRAY>
|
||||
* 1: Fuze delay (for each explosive; use negative number for random time up to value) <NUMBER> <OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
@ -18,10 +18,13 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_explosiveArr",["_fuzeTime",0]];
|
||||
params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]]];
|
||||
|
||||
if (_explosiveArr isEqualType objNull) then {
|
||||
_explosiveArr = [_explosiveArr];
|
||||
};
|
||||
|
||||
private _detTime;
|
||||
{
|
||||
_detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
|
||||
private _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
|
||||
[objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive);
|
||||
} forEach _explosiveArr;
|
||||
|
Loading…
Reference in New Issue
Block a user