2015-04-05 18:51:39 +00:00
|
|
|
//#define DEBUG_MODE_FULL
|
2015-04-04 23:55:53 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
TRACE_1("enter", _this);
|
|
|
|
|
2015-04-14 18:18:16 +00:00
|
|
|
#define __LOCKONTIMERANDOM 2 // Deviation in lock on time
|
|
|
|
|
2015-04-04 23:55:53 +00:00
|
|
|
if((count _this) > 0) then {
|
|
|
|
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
|
|
|
|
};
|
|
|
|
|
2015-04-10 17:42:02 +00:00
|
|
|
ACE_player setVariable ["ace_missileguidance_target",nil, false];
|
|
|
|
|
|
|
|
__JavelinIGUISeek ctrlSetTextColor __ColorGray;
|
|
|
|
__JavelinIGUINFOV ctrlSetTextColor __ColorGray;
|
|
|
|
|
2015-04-11 18:17:34 +00:00
|
|
|
__JavelinIGUITargeting ctrlShow false;
|
2015-04-10 20:57:44 +00:00
|
|
|
__JavelinIGUITargetingConstrains ctrlShow false;
|
|
|
|
__JavelinIGUITargetingGate ctrlShow false;
|
|
|
|
__JavelinIGUITargetingLines ctrlShow false;
|
|
|
|
|
2015-04-04 23:55:53 +00:00
|
|
|
uiNameSpace setVariable [QGVAR(arguments),
|
|
|
|
[
|
|
|
|
0, // Last runtime
|
2015-04-05 18:51:39 +00:00
|
|
|
objNull, // currentTargetObject
|
|
|
|
0, // Run Time
|
|
|
|
0, // Lock Time
|
2015-04-14 18:18:16 +00:00
|
|
|
0, // Sound timer
|
2015-04-15 16:10:00 +00:00
|
|
|
(random __LOCKONTIMERANDOM), // random lock time addition
|
|
|
|
-1
|
2015-04-04 23:55:53 +00:00
|
|
|
]
|
2015-04-12 23:18:39 +00:00
|
|
|
];
|
|
|
|
|
2015-04-14 18:18:16 +00:00
|
|
|
|
|
|
|
|
2015-04-12 23:18:39 +00:00
|
|
|
_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil];
|
|
|
|
if(isNil "_pfh_handle") then {
|
|
|
|
_pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler;
|
|
|
|
uiNamespace setVariable["ACE_RscOptics_javelin_PFH", _pfh_handle];
|
|
|
|
};
|