ACE3/addons/javelin/functions/fnc_onOpticLoad.sqf

38 lines
1.1 KiB
Plaintext
Raw Normal View History

//#define DEBUG_MODE_FULL
2015-04-04 23:55:53 +00:00
#include "script_component.hpp"
TRACE_1("enter", _this);
#define __LOCKONTIMERANDOM 2 // Deviation in lock on ACE_time
2015-04-04 23:55:53 +00:00
if((count _this) > 0) then {
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
};
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-07-05 04:14:44 +00:00
if(GVAR(pfehID) != -1) then {
[] call FUNC(onOpticUnload); // Unload optic if it was already loaded
};
2015-04-04 23:55:53 +00:00
uiNameSpace setVariable [QGVAR(arguments),
[
2015-06-03 07:32:53 +00:00
ACE_diagTime, // Last runtime
objNull, // currentTargetObject
0, // Run Time
0, // Lock Time
0, // Sound timer
(random __LOCKONTIMERANDOM), // random lock ACE_time addition
-1
2015-04-04 23:55:53 +00:00
]
];
2015-07-05 04:14:44 +00:00
GVAR(pfehID) = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler;