2016-11-15 18:15:25 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus
|
|
|
|
* Cycles fire mode (top/dir)
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_javelin_fnc_cycleFireMode
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
// #define DEBUG_MODE_FULL
|
2016-05-30 16:37:03 +00:00
|
|
|
#include "script_component.hpp"
|
2016-11-15 18:15:25 +00:00
|
|
|
|
|
|
|
TRACE_1("cycle fire mode", _this);
|
2016-05-30 16:37:03 +00:00
|
|
|
|
2016-07-06 01:58:32 +00:00
|
|
|
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
|
2016-11-15 18:15:25 +00:00
|
|
|
private _currentFireMode = _currentShooter getVariable ["ace_missileguidance_attackProfile", "JAV_TOP"];
|
2016-05-30 16:37:03 +00:00
|
|
|
|
2016-11-15 18:15:25 +00:00
|
|
|
if (_currentFireMode == "JAV_DIR") then {
|
2016-05-30 16:37:03 +00:00
|
|
|
_currentFireMode = "JAV_TOP";
|
|
|
|
} else {
|
|
|
|
_currentFireMode = "JAV_DIR";
|
|
|
|
};
|
2016-11-15 18:15:25 +00:00
|
|
|
_currentShooter setVariable ["ace_missileguidance_attackProfile", _currentFireMode, false];
|
|
|
|
TRACE_2("set",_currentFireMode,_currentShooter);
|