mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Grenades - use correct type for cookoff_enabled, check for AI and variable on vehicle (#7634)
* check for variable and ai, use correct type * clean up negations Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
This commit is contained in:
parent
ab989d4c34
commit
217ccce465
@ -229,7 +229,10 @@ private _enginePosition = _vehicle modelToWorld (_vehicle selectionPosition _eng
|
||||
if (_position distance _enginePosition < EFFECT_SIZE * 2) then {
|
||||
_vehicle setHit [_engineSelection, 1];
|
||||
|
||||
if ("ace_cookoff" call EFUNC(common,isModLoaded) && {EGVAR(cookoff,enable)}) then {
|
||||
if ("ace_cookoff" call EFUNC(common,isModLoaded)) then {
|
||||
private _enabled = _vehicle getVariable [QEGVAR(cookoff,enable), EGVAR(cookoff,enable)];
|
||||
if (_enabled in [2, true] || {_enabled isEqualTo 1 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} != -1}}) then {
|
||||
_vehicle call EFUNC(cookoff,engineFire);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user