2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-10-12 22:35:24 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus / nou
|
|
|
|
* Handles AI shooting a locking missile
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Target <OBJECT>
|
|
|
|
* 1: Ammo <STRING>
|
|
|
|
* 2: Shooter <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2020-04-25 06:41:45 +00:00
|
|
|
* [cursorTarget, "x", player] call ace_missileguidance_fnc_onIncomingMissile;
|
2016-10-12 22:35:24 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2016-05-30 16:37:03 +00:00
|
|
|
|
2016-10-12 22:35:24 +00:00
|
|
|
params ["_target", "_ammo", "_shooter"];
|
|
|
|
|
|
|
|
if (GVAR(enabled) < 1) exitWith {}; // bail if enabled
|
2016-05-30 16:37:03 +00:00
|
|
|
if !(local (gunner _shooter) || {local _shooter}) exitWith {}; // bail if not shooter
|
|
|
|
|
2016-10-12 22:35:24 +00:00
|
|
|
_shooter setVariable [QGVAR(vanilla_target),_target, false];
|
|
|
|
TRACE_2("setting vanilla target",_shooter,_target);
|