mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
5e396a3793
This reverts commit 4d1a5194ea
.
36 lines
807 B
Plaintext
36 lines
807 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Handle Air burst ammunition. Called from per frame handler.
|
|
*
|
|
* Arguments:
|
|
* -
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
(_this select 0) params ["_vehicle", "_projectile", "_zeroing"];
|
|
|
|
// remove pfh if the projectile died before arriving
|
|
if (isNull _projectile || {!alive _projectile}) exitWith {
|
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
|
};
|
|
|
|
// wait if not there
|
|
if (_projectile distance _vehicle < _zeroing) exitWith {};
|
|
|
|
// explode
|
|
private _position = getPosATL _projectile;
|
|
|
|
private _subMunition = createVehicle ["ACE_B_35mm_ABM_Helper", _position, [], 0, "FLY"];
|
|
|
|
_subMunition setPosATL _position;
|
|
_subMunition setVelocity [0, 0, -10];
|
|
|
|
deleteVehicle _projectile;
|
|
|
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|