Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All - Fix parentheses around code #10073

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/advanced_ballistics/functions/fnc_handleFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);

if (!(_ammo isKindOf "BulletBase")) exitWith {};
if !(_ammo isKindOf "BulletBase") exitWith {};
if (!alive _projectile) exitWith {};
if (underwater _unit) exitWith {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (_transonicStabilityCoef == 0) then {
_transonicStabilityCoef = 0.5;
};
private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
if !(_dragModel in [1, 2, 5, 6, 7, 8]) then {
_dragModel = 1;
};
private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GVAR(tempWindInfo) = false;
// Add keybinds
["ACE3 Weapons", QGVAR(prepare), localize LSTRING(Prepare), {
// Condition
if (!([ACE_player] call FUNC(canPrepare))) exitWith {false};
if !([ACE_player] call FUNC(canPrepare)) exitWith {false};
if (EGVAR(common,isReloading)) exitWith {true};

// Statement
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_prepare.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TRACE_1("params",_unit);
// Select next throwable if one already in hand
if (_unit getVariable [QGVAR(inHand), false]) exitWith {
TRACE_1("inHand",_unit);
if (!(_unit getVariable [QGVAR(primed), false])) then {
if !(_unit getVariable [QGVAR(primed), false]) then {
TRACE_1("not primed",_unit);
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
// selectNextGrenade relies on muzzles array (setAmmo 0 removes the muzzle from the array and current can't be found, cycles between 0 and 1 muzzles)
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_throw.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TRACE_1("params",_unit);

// Prime the throwable if it hasn't been cooking already
// Next to proper simulation this also has to happen before delay for orientation of the throwable to be set
if (!(_unit getVariable [QGVAR(primed), false])) then {
if !(_unit getVariable [QGVAR(primed), false]) then {
[_unit] call FUNC(prime);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_showItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ if (_nextAction != GVAR(currentAction)) then {
GVAR(currentAction) = _nextAction;
};

if (!(GVAR(currentAction) in ["Civil", "Salute"])) then {
if !(GVAR(currentAction) in ["Civil", "Salute"]) then {
GVAR(center) selectWeapon ([primaryWeapon GVAR(center), secondaryWeapon GVAR(center), handgunWeapon GVAR(center), binocular GVAR(center)] select GVAR(selectedWeaponType)); // select correct weapon, prevents floating weapons
};
2 changes: 1 addition & 1 deletion addons/artillerytables/functions/fnc_firedEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
params ["_vehicle", "", "", "", "", "_magazine", "_projectile", "_gunner"];
TRACE_4("firedEH",_vehicle,_magazine,_projectile,_gunner);

if (!([_gunner] call EFUNC(common,isPlayer))) exitWith {}; // AI don't know how to use (this does give them more range than a player)
if !([_gunner] call EFUNC(common,isPlayer)) exitWith {}; // AI don't know how to use (this does give them more range than a player)
if ((gunner _vehicle) != _gunner) exitWith {}; // check if primaryGunner


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ params ["_menuType"];
TRACE_1("interactMenuOpened",_menuType);

if (_menuType != 1) exitWith {};
if (!("ACE_artilleryTable" in (ace_player call EFUNC(common,uniqueItems)))) exitWith {};
if !("ACE_artilleryTable" in (ace_player call EFUNC(common,uniqueItems))) exitWith {};

private _vehicleAdded = ace_player getVariable [QGVAR(vehiclesAdded), []];
private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []];
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/functions/fnc_initGunList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
_resetGunList = false;
{
// Verify each gun has correct param type
if (!(_x isEqualTypeArray ["", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [], [], false])) exitWith {
if !(_x isEqualTypeArray ["", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [], [], false]) exitWith {
_resetGunList = true;
};
} forEach GVAR(gunList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private _validate_preset = {
ERROR(_errorMsg);
_valid = false;
};
if (!((_this select 17) in ["ASM", "ICAO"])) then {
if !((_this select 17) in ["ASM", "ICAO"]) then {
private _errorMsg = format ["Invalid atmosphere model: %1", _this select 17];
ERROR(_errorMsg);
_valid = false;
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/functions/fnc_target_speed_assist_timer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if !(ctrlVisible 9000) then {
params ["_args"];
_args params ["_startTime"];

if (!(GVAR(speedAssistTimer))) exitWith {
if !(GVAR(speedAssistTimer)) exitWith {
GVAR(speedAssistTimer) = true;

ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Public: No
*/

if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {};
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {};

if (ctrlVisible 17000) then {
false call FUNC(show_c1_ballistic_coefficient_data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Public: No
*/

if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {};
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {};

if (ctrlVisible 16000) then {
false call FUNC(show_muzzle_velocity_data);
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/functions/fnc_toggle_truing_drop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Public: No
*/

if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {};
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {};

if (ctrlVisible 18000) then {
false call FUNC(show_truing_drop);
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/functions/fnc_update_zero_range.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!GVAR(atmosphereModeTBH)) then {
_relativeHumidity = 0.5;
};

private _scopeBaseAngle = if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then {
private _scopeBaseAngle = if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight];
(parseNumber _zeroAngle)
} else {
Expand Down
2 changes: 1 addition & 1 deletion addons/attach/functions/fnc_handleKilled.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (_attachedList isEqualTo []) exitWith {};
TRACE_2("detaching",_xObject,_deadUnit);
detach _xObject;
//If it's a vehicle, also delete the attached
if (!(_deadUnit isKindOf "CAManBase")) then {
if !(_deadUnit isKindOf "CAManBase") then {
_xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]);
[{deleteVehicle (_this select 0)}, [_xObject], 2] call CBA_fnc_waitAndExecute;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_doEscortCaptive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (_state) then {
};
};

if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
if !(_unit getVariable [QGVAR(isEscorting), false]) then {
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
[objNull, _target, false] call EFUNC(common,claim);
detach _target;
Expand Down
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_setHandcuffed.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if (_state) then {
// fix anim on mission start (should work on dedicated servers)
[{
params ["_unit"];
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) exitWith {};
if !(_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {};

if ((vehicle _unit) == _unit) then {
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
Expand Down
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_setSurrendered.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if (_state) then {

if (_unit == ACE_player) then {
//only re-enable HUD if not handcuffed
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
if !(_unit getVariable [QGVAR(isHandcuffed), false]) then {
["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/common/dev/test_cfgPatches.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private _allWeapons = [];
private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgVehicles");
{
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
if (!((toLowerANSI configName _x) in _allUnits)) then {
if !((toLowerANSI configName _x) in _allUnits) then {
WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x);
_testPass = false;
};
Expand All @@ -62,7 +62,7 @@ private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (config
{
private _type = toLowerANSI configName _x;
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
if (!((toLowerANSI configName _x) in _allWeapons)) then {
if !((toLowerANSI configName _x) in _allWeapons) then {
WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x);
_testPass = false;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_defineVariable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi

if (isNil "_defaultGlobal") exitWith {};

if (!(_name isEqualType "")) exitwith {
if !(_name isEqualType "") exitwith {
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_showHud.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private _resultMask = [];
for "_index" from 0 to 9 do {
private _set = true; //Default to true
{
if (!(_x select _index)) exitWith {
if !(_x select _index) exitWith {
_set = false; //Any false will make it false
};
} forEach _masks;
Expand Down
3 changes: 2 additions & 1 deletion addons/compat_sog/functions/fnc_handlePunjiTrapTrigger.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
*
* Public: No
*/

params ["_trap"];
if (!(["ace_medical"] call EFUNC(common,isModLoaded))) exitWith {};
if !(["ace_medical"] call EFUNC(common,isModLoaded)) exitWith {};

private _radius = getNumber (configOf _trap >> "indirectHitRange");
private _affectedUnits = _trap nearEntities ["CAManBase", _radius];
Expand Down
2 changes: 1 addition & 1 deletion addons/concertina_wire/functions/fnc_handleDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
params ["_wire", "", "_damage", "_source", ""];
if (_damage < 0.5) exitWith { 0 };

if (!(isNull _source)) then {
if (!isNull _source) then {
_wire setVariable [QGVAR(lastDamager), _source];
};

Expand Down
2 changes: 1 addition & 1 deletion addons/csw/functions/fnc_reload_handleAddTurretMag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ params ["_vehicle", "_turret", "_magSource", "_carryMag", "_ammoReceived", ["_re
TRACE_6("reload_handleAddTurretMag",_vehicle,_turret,_magSource,_carryMag,_ammoReceived,_returnTo);

TRACE_2("",local _vehicle,_vehicle turretLocal _turret);
if (!(_vehicle turretLocal _turret)) exitWith {};
if !(_vehicle turretLocal _turret) exitWith {};

([_vehicle, _turret, _carryMag] call FUNC(reload_canLoadMagazine)) params ["_canAdd", "_loadedMag", "_neededAmmo", "_isBeltLinking"];
TRACE_4("canLoad",_canAdd,_loadedMag,_neededAmmo,_isBeltLinking);
Expand Down
2 changes: 1 addition & 1 deletion addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ params ["_vehicle", "_turretPath", "_carryMag", "_vehMag", "_unloadTo"];
TRACE_5("removeTurretMag EH",_vehicle,_turretPath,_carryMag,_vehMag,_unloadTo);

TRACE_3("",local _vehicle,_vehicle turretLocal _turretPath,local _unloadTo);
if (!(_vehicle turretLocal _turretPath)) exitWith {};
if !(_vehicle turretLocal _turretPath) exitWith {};

private _magsInWeapon = []; // Check how much ammo it has now:
{
Expand Down
7 changes: 3 additions & 4 deletions addons/disarming/functions/fnc_disarmDropItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private _fncSumArray = {
};

//Sanity Checks
if (!([_target] call FUNC(canBeDisarmed))) exitWith {
if !([_target] call FUNC(canBeDisarmed)) exitWith {
[_caller, _target, "Debug: Cannot disarm target"] call FUNC(eventTargetFinish);
};
if (_doNotDropAmmo && {({_x in _listOfItemsToRemove} count (magazines _target)) > 0}) exitWith {
Expand Down Expand Up @@ -74,7 +74,6 @@ if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
};
_holder setVariable [QGVAR(holderInUse), true];


//Remove Magazines
private _targetMagazinesStart = magazinesAmmo _target;
private _holderMagazinesStart = magazinesAmmoCargo _holder;
Expand All @@ -96,7 +95,7 @@ if (({((_x select 0) in _listOfItemsToRemove) && {(getNumber (configFile >> "Cfg
[_caller, _target, "Debug: Didn't Remove Magazines"] call FUNC(eventTargetFinish);
};
//Verify holder has mags unit had
if (!([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holderMagazinesEnd] call FUNC(verifyMagazinesMoved))) then {
if !([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holderMagazinesEnd] call FUNC(verifyMagazinesMoved)) then {
_holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Crate Magazines not in holder"] call FUNC(eventTargetFinish);
};
Expand Down Expand Up @@ -238,7 +237,7 @@ if (_holderIsEmpty) then {
[_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish);
};
//If target lost disarm status:
if (!([_target] call FUNC(canBeDisarmed))) exitWith {
if !([_target] call FUNC(canBeDisarmed)) exitWith {
_holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/disarming/functions/fnc_eventTargetStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private _itemsToAdd = [];
} forEach _listOfObjectsToRemove;

{
if (!(_x in _listOfObjectsToRemove)) then {
if !(_x in _listOfObjectsToRemove) then {
_listOfObjectsToRemove pushBack _x;
};
} forEach _itemsToAdd;
Expand Down
11 changes: 7 additions & 4 deletions addons/disarming/functions/fnc_openDisarmDialog.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
*
* Public: No
*/

params ["_caller", "_target"];
#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"

#define DEFAULTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"

//Sanity Checks
if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");};
if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");};
if !([_player, _target] call FUNC(canPlayerDisarmUnit)) exitWith {ERROR("Can't Disarm Unit");};
if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;};

disableSerialization;
Expand Down Expand Up @@ -74,8 +77,8 @@ GVAR(disarmTarget) = _target;
private _rankPicture = _display displayCtrl 1203;

//Show rank and name (just like BIS's inventory)
private _icon = format [DEFUALTPATH, toLowerANSI (rank _target)];
if (_icon isEqualTo DEFUALTPATH) then {_icon = ""};
private _icon = format [DEFAULTPATH, toLowerANSI (rank _target)];
if (_icon isEqualTo DEFAULTPATH) then {_icon = ""};
_rankPicture ctrlSetText _icon;
_playerName ctrlSetText ([GVAR(disarmTarget), false, true] call EFUNC(common,getName));

Expand Down
4 changes: 2 additions & 2 deletions addons/dragon/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
["vehicle", {
params ["","_vehicle"];
TRACE_2("vehicle change",_vehicle,typeOf _vehicle);
if (!(_vehicle isKindOf QGVAR(staticBase))) exitWith {};
if !(_vehicle isKindOf QGVAR(staticBase)) exitWith {};

_vehicle animate ["rest_rotate", 0];

if (isNil QGVAR(pfID)) then {GVAR(pfID) = -1};
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;

private _lastView = cameraView;
if (!(_lastView in ["INTERNAL", "EXTERNAL"])) then { _lastView == "INTERNAL"; };
if !(_lastView in ["INTERNAL", "EXTERNAL"]) then { _lastView == "INTERNAL"; };

GVAR(pfID) = [{
params ["_args"];
Expand Down
2 changes: 1 addition & 1 deletion addons/dragon/functions/fnc_sightAttach.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params ["_target", "_unit", ["_event", false]];
TRACE_3("sightAttach",_target,_unit,_event);

if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
if (!(_target turretLocal [0])) exitWith {};
if !(_target turretLocal [0]) exitWith {};
_target setVariable [QGVAR(sightAttached), true, true];
_target animate ["optic_hide", 0];
_target addWeapon QGVAR(superStatic);
Expand Down
2 changes: 1 addition & 1 deletion addons/dragon/functions/fnc_sightDetach.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ params ["_target", "_unit", ["_event", false]];
TRACE_3("sightDetach",_target,_unit,_event);

if (_event isEqualTo true) then { // this is actually needed as 3rd arg may not be bool
if (!(_target turretLocal [0])) exitWith {};
if !(_target turretLocal [0]) exitWith {};
_target setVariable [QGVAR(sightAttached), false, true];
_target animate ["optic_hide", 1];
_target removeWeapon QGVAR(superStatic);
Expand Down
4 changes: 2 additions & 2 deletions addons/explosives/functions/fnc_addDetonateActions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private _explosivesList = [];
// If the detonator is not active, is a clacker and has assigned explosives, generate an interaction to make it the active detonator for use with the "trigger all" keybind
if (
_detonator != GVAR(activeTrigger) &&
{_detonator != "Cellphone"} &&
{_detonator != "Cellphone"} &&
{
_explosivesList isNotEqualTo [] ||
{_detonator == "ACE_DeadManSwitch" && {_unit getVariable [QGVAR(deadmanInvExplosive), ""] != ""}}
Expand Down Expand Up @@ -144,7 +144,7 @@ if (_detonator != "ACE_DeadManSwitch") then {
private _procressedMags = [];
{
private _mag = _x;
if (!(_mag in _procressedMags)) then {
if !(_mag in _procressedMags) then {
_procressedMags pushBack _x;
private _magConfig = configFile >> "CfgMagazines" >> _mag;
private _supportedTriggers = getArray (_magConfig >> "ACE_Triggers" >> "SupportedTriggers");
Expand Down
2 changes: 1 addition & 1 deletion addons/explosives/functions/fnc_onIncapacitated.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TRACE_2("placed",_deadman,_range);
//Handle deadman connected to explosive in inventory
private _connectedInventoryExplosive = _unit getVariable [QGVAR(deadmanInvExplosive), ""];
if (_connectedInventoryExplosive != "") then {
if (!(_connectedInventoryExplosive in (magazines _unit))) exitWith {};
if !(_connectedInventoryExplosive in (magazines _unit)) exitWith {};

//Remove mag and reset variable
_unit removeMagazine _connectedInventoryExplosive;
Expand Down
Loading
Loading