ACE3/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf
2015-02-14 07:51:13 +01:00

22 lines
574 B
Plaintext

// by commy2
_vehicle = _this select 0 select 0;
_projectile = _this select 0 select 1;
_zeroing = _this select 0 select 2;
if (isNull _projectile || {!alive _projectile}) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
if (_projectile distance _vehicle < _zeroing) exitWith {};
_position = getPosATL _projectile;
_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;