mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix javelin fire block not being removed (#4228)
This commit is contained in:
parent
5e40c24985
commit
a2da54bfec
@ -7,4 +7,28 @@ ADDON = false;
|
|||||||
GVAR(isLockKeyDown) = false;
|
GVAR(isLockKeyDown) = false;
|
||||||
GVAR(pfehID) = -1;
|
GVAR(pfehID) = -1;
|
||||||
|
|
||||||
|
DFUNC(disableFire) = {
|
||||||
|
params ["_firedEH"];
|
||||||
|
|
||||||
|
if(_firedEH < 0 && {difficulty > 0}) then {
|
||||||
|
_firedEH = [ACE_player, "DefaultAction", {true}, {
|
||||||
|
_canFire = (_this select 1) getVariable["ace_missileguidance_target", nil];
|
||||||
|
if(!isNil "_canFire") exitWith { false };
|
||||||
|
true
|
||||||
|
}] call EFUNC(common,addActionEventHandler);
|
||||||
|
TRACE_1("added",_firedEH);
|
||||||
|
|
||||||
|
};
|
||||||
|
_firedEH
|
||||||
|
};
|
||||||
|
DFUNC(enableFire) = {
|
||||||
|
params ["_firedEH"];
|
||||||
|
|
||||||
|
if(_firedEH >= 0 && {difficulty > 0}) then {
|
||||||
|
TRACE_1("removing",_firedEH);
|
||||||
|
[ACE_player, "DefaultAction", _firedEH] call EFUNC(common,removeActionEventHandler);
|
||||||
|
};
|
||||||
|
-1
|
||||||
|
};
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -146,27 +146,6 @@ if((call CBA_fnc_getFoV) select 1 > 9) then {
|
|||||||
__JavelinIGUIWFOV ctrlSetTextColor __ColorGreen;
|
__JavelinIGUIWFOV ctrlSetTextColor __ColorGreen;
|
||||||
};
|
};
|
||||||
|
|
||||||
FUNC(disableFire) = {
|
|
||||||
_firedEH = _this select 0;
|
|
||||||
|
|
||||||
if(_firedEH < 0 && difficulty > 0) then {
|
|
||||||
_firedEH = [ACE_player, "DefaultAction", {true}, {
|
|
||||||
_canFire = (_this select 1) getVariable["ace_missileguidance_target", nil];
|
|
||||||
if(!isNil "_canFire") exitWith { false };
|
|
||||||
true
|
|
||||||
}] call EFUNC(common,addActionEventHandler);
|
|
||||||
};
|
|
||||||
_firedEH
|
|
||||||
};
|
|
||||||
FUNC(enableFire) = {
|
|
||||||
_firedEH = _this select 0;
|
|
||||||
|
|
||||||
if(_firedEH > 0 && difficulty > 0) then {
|
|
||||||
[ACE_player, "DefaultAction", _firedEH] call EFUNC(common,removeActionEventHandler);
|
|
||||||
};
|
|
||||||
-1
|
|
||||||
};
|
|
||||||
|
|
||||||
if (isNull _newTarget) then {
|
if (isNull _newTarget) then {
|
||||||
// No targets found
|
// No targets found
|
||||||
_currentTarget = objNull;
|
_currentTarget = objNull;
|
||||||
|
Loading…
Reference in New Issue
Block a user