ACE3/addons/javelin/functions/fnc_cycleFireMode.sqf
PabstMirror b4315b6a65 Javelin overhaul (#4580)
* Javelin overhaul

* header spelling fix
2016-11-15 12:15:25 -06:00

31 lines
759 B
Plaintext

/*
* Author: jaynus
* Cycles fire mode (top/dir)
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_javelin_fnc_cycleFireMode
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
TRACE_1("cycle fire mode", _this);
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
private _currentFireMode = _currentShooter getVariable ["ace_missileguidance_attackProfile", "JAV_TOP"];
if (_currentFireMode == "JAV_DIR") then {
_currentFireMode = "JAV_TOP";
} else {
_currentFireMode = "JAV_DIR";
};
_currentShooter setVariable ["ace_missileguidance_attackProfile", _currentFireMode, false];
TRACE_2("set",_currentFireMode,_currentShooter);