Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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/arsenal/functions/fnc_attributeInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (_mode > 0) then {

// Wait until all items have been added, so that the blacklisted items can be removed
[{
!isNil {(_this select 0) getVariable QGVAR(virtualItems)}
!((_this select 0) isNil QGVAR(virtualItems))
}, {
[_this select 0, _this select 1, true] call FUNC(removeVirtualItems);
}, [_object, _items], 20] call CBA_fnc_waitUntilAndExecute; // 20s timeout in case of failure
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_initBox.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params [["_object", objNull, [objNull]], ["_items", true, [[], true]], ["_global

if (isNull _object) exitWith {};

if (_global && {isMultiplayer} && {isNil {_object getVariable QGVAR(initBoxJIP)}}) then {
if (_global && {isMultiplayer} && {(_object isNil QGVAR(initBoxJIP))}) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_global && {isMultiplayer} && {(_object isNil QGVAR(initBoxJIP))}) then {
if (_global && isMultiplayer && {_object isNil QGVAR(initBoxJIP)}) then {

private _id = [QGVAR(initBox), [_object, _items, false]] call CBA_fnc_globalEventJIP;

// Remove JIP EH if object is deleted
Expand Down Expand Up @@ -52,7 +52,7 @@ if (_global && {isMultiplayer} && {isNil {_object getVariable QGVAR(initBoxJIP)}
[_object, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject);

// If items were set globally, do not add items locally
if (isNil {_object getVariable QGVAR(virtualItems)}) then {
if ((_object isNil QGVAR(virtualItems))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_object isNil QGVAR(virtualItems))) then {
if (_object isNil QGVAR(virtualItems)) then {

[_object, _items, false] call FUNC(addVirtualItems);
};

Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_onArsenalOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (isNil QGVAR(sharedLoadoutsNamespace)) then {
publicVariable QGVAR(sharedLoadoutsNamespace);
};

if (isNil {GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars)}) then {
if ((GVAR(sharedLoadoutsNamespace) isNil QGVAR(sharedLoadoutsVars))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((GVAR(sharedLoadoutsNamespace) isNil QGVAR(sharedLoadoutsVars))) then {
if (GVAR(sharedLoadoutsNamespace) isNil QGVAR(sharedLoadoutsVars)) then {

GVAR(sharedLoadoutsNamespace) setVariable [QGVAR(sharedLoadoutsVars), [], true];
};

Expand All @@ -42,7 +42,7 @@ if (isNil QGVAR(defaultLoadoutsList)) then {
};
};

if (isNil {profileNamespace getVariable QGVAR(saved_loadouts)}) then {
if ((profileNamespace isNil QGVAR(saved_loadouts))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((profileNamespace isNil QGVAR(saved_loadouts))) then {
if (profileNamespace isNil QGVAR(saved_loadouts)) then {

profileNamespace setVariable [QGVAR(saved_loadouts), []];
};

Expand Down
8 changes: 1 addition & 7 deletions addons/arsenal/functions/fnc_onSelChangedRight.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,7 @@ switch (_currentItemsIndex) do {
case IDX_CURR_SECONDARY_WEAPON_ITEMS: {
private _currentItemInSlot = (GVAR(currentItems) select IDX_CURR_SECONDARY_WEAPON_ITEMS) select _itemIndex;
private _isDisposable = CBA_disposable_replaceDisposableLauncher && {!isNil "CBA_disposable_loadedLaunchers"} &&
{
if (CBA_disposable_loadedLaunchers isEqualType createHashMap) then { // after CBA 3.18
(secondaryWeapon GVAR(center)) in CBA_disposable_loadedLaunchers
} else {
!isNil {CBA_disposable_loadedLaunchers getVariable (secondaryWeapon player)}
}
};
{(secondaryWeapon GVAR(center)) in CBA_disposable_loadedLaunchers};

// If removal
if (_item == "") then {
Expand Down
2 changes: 1 addition & 1 deletion addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ GVAR(isReloading) = false;
call FUNC(swayLoop);
};
// check for pre-3.16 sway factors being added
if (!isNil {missionNamespace getVariable "ACE_setCustomAimCoef"}) then {
if (!(missionNamespace isNil "ACE_setCustomAimCoef")) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(missionNamespace isNil "ACE_setCustomAimCoef")) then {
if !(missionNamespace isNil "ACE_setCustomAimCoef") then {

WARNING("ACE_setCustomAimCoef no longer supported - use ace_common_fnc_addSwayFactor");
WARNING_1("source: %1",(missionNamespace getVariable "ACE_setCustomAimCoef") apply {_x});
};
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_readSettingFromModule.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (isNil _settingName) exitWith {
};

// Check if the parameter is defined in the module
if (isNil {_logic getVariable _moduleVariable}) exitWith {
if ((_logic isNil _moduleVariable)) exitWith {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_logic isNil _moduleVariable)) exitWith {
if (_logic isNil _moduleVariable) exitWith {

WARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_setPlayerOwner.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (isServer) then {
addMissionEventHandler ["HandleDisconnect", {
params ["_dcPlayer"];
TRACE_1("HandleDisconnect eh",_dcPlayer);
if (!isNil {_dcPlayer getVariable QGVAR(playerOwner)}) then {
if (!(_dcPlayer isNil QGVAR(playerOwner))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(_dcPlayer isNil QGVAR(playerOwner))) then {
if !(_dcPlayer isNil QGVAR(playerOwner)) then {

_dcPlayer setVariable [QGVAR(playerOwner), nil, true];
};
}];
Expand Down
4 changes: 2 additions & 2 deletions addons/dogtags/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if (hasInterface) then {
format ["%1: %2", LLSTRING(itemName), LLSTRING(checkDogtag)],
QPATHTOF(data\dogtag_icon_ca.paa),
{[_player, _target] call FUNC(checkDogtag)},
{!isNil {_target getVariable QGVAR(dogtagData)}}
{!(_target isNil QGVAR(dogtagData))}
] call EFUNC(interact_menu,createAction);

["ACE_bodyBagObject", 0, ["ACE_MainActions"], _checkTagAction, true] call EFUNC(interact_menu,addActionToClass);
Expand All @@ -104,7 +104,7 @@ if (hasInterface) then {
format ["%1: %2", LLSTRING(itemName), LLSTRING(takeDogtag)],
QPATHTOF(data\dogtag_icon_ca.paa),
{[_player, _target] call FUNC(takeDogtag)},
{(!isNil {_target getVariable QGVAR(dogtagData)}) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}}
{(!(_target isNil QGVAR(dogtagData))) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{(!(_target isNil QGVAR(dogtagData))) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}}
{!(_target isNil QGVAR(dogtagData)) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}}

] call EFUNC(interact_menu,createAction);

["ACE_bodyBagObject", 0, ["ACE_MainActions"], _takeTagAction, true] call EFUNC(interact_menu,addActionToClass);
Expand Down
2 changes: 1 addition & 1 deletion addons/dragging/functions/fnc_resumeCarry.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params ["_unit"];
if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {};

// If action is already present, don't add it again
if (!isNil {_unit getVariable QGVAR(releaseActionID)}) exitWith {};
if (!(_unit isNil QGVAR(releaseActionID))) exitWith {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(_unit isNil QGVAR(releaseActionID))) exitWith {};
if !(_unit isNil QGVAR(releaseActionID)) exitWith {};


// Remove drop action
_unit setVariable [QGVAR(releaseActionID), [
Expand Down
2 changes: 1 addition & 1 deletion addons/fastroping/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (isServer) then {
["Air", "init", {
if (!GVAR(autoAddFRIES)) exitWith {};
params ["_vehicle"];
if (isNumber (configOf _vehicle >> QGVAR(enabled)) && {isNil {_vehicle getVariable [QGVAR(FRIES), nil]}}) then {
if (isNumber (configOf _vehicle >> QGVAR(enabled)) && {(_vehicle isNil QGVAR(FRIES))}) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (isNumber (configOf _vehicle >> QGVAR(enabled)) && {(_vehicle isNil QGVAR(FRIES))}) then {
if (isNumber (configOf _vehicle >> QGVAR(enabled)) && {_vehicle isNil QGVAR(FRIES)}) then {

[_vehicle] call FUNC(equipFRIES);
};
}, true, ["ACE_friesBase"], true] call CBA_fnc_addClassEventHandler;
Expand Down
2 changes: 1 addition & 1 deletion addons/fire/functions/fnc_burnEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if (isServer) then {
};

// Display burn indicators
if (_unit == ACE_player && {alive _unit} && {isNil {_unit getVariable QGVAR(burnUIPFH)}}) then { // This accounts for player remote controlled a new unit
if (_unit == ACE_player && {alive _unit} && {(_unit isNil QGVAR(burnUIPFH))}) then { // This accounts for player remote controlled a new unit
Copy link
Copy Markdown
Contributor

@rautamiekka rautamiekka Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_unit == ACE_player && {alive _unit} && {(_unit isNil QGVAR(burnUIPFH))}) then { // This accounts for player remote controlled a new unit
if (_unit == ACE_player && {alive _unit} && {_unit isNil QGVAR(burnUIPFH)}) then { // This accounts for player remote-controlling a new unit

private _burnIndicatorPFH = [LINKFUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler;
_unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH];
};
Expand Down
2 changes: 1 addition & 1 deletion addons/fire/functions/fnc_burnSimulation.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ params ["_unit", "_instigator"];

_pfhID call CBA_fnc_removePerFrameHandler;

if (!isNil {_unit getVariable QGVAR(stopDropRoll)} && {!isPlayer _unit}) then {
if (!(_unit isNil QGVAR(stopDropRoll)) && {!isPlayer _unit}) then {
_unit setUnitPos "AUTO";

_unit setVariable [QGVAR(stopDropRoll), nil, true];
Expand Down
4 changes: 2 additions & 2 deletions addons/fortify/functions/fnc_registerObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ _objects = _objects select {
_isValid
};

if (!isNil {missionNamespace getVariable format [QGVAR(Budget_%1), _side]}) then {
if (!(missionNamespace isNil format [QGVAR(Budget_%1), _side])) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(missionNamespace isNil format [QGVAR(Budget_%1), _side])) then {
if !(missionNamespace isNil format [QGVAR(Budget_%1), _side]) then {

INFO_1("Overwriting previous budget for side [%1]",_side);
};
if (!isNil {missionNamespace getVariable format [QGVAR(Objects_%1), _side]}) then {
if (!(missionNamespace isNil format [QGVAR(Objects_%1), _side])) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(missionNamespace isNil format [QGVAR(Objects_%1), _side])) then {
if !(missionNamespace isNil format [QGVAR(Objects_%1), _side]) then {

INFO_1("Overwriting previous objects for side [%1]",_side);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_compileMenuZeus.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

// Exit if the action menu is already compiled for zeus
if (!isNil {missionNamespace getVariable [QGVAR(ZeusActions), nil]}) exitWith {};
if (!(missionNamespace isNil QGVAR(ZeusActions))) exitWith {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(missionNamespace isNil QGVAR(ZeusActions))) exitWith {};
if !(missionNamespace isNil QGVAR(ZeusActions)) exitWith {};


private _recurseFnc = {
params ["_actionsCfg"];
Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_initMenuReorder.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private _fnc_processNode = {
private _conditionFullString = format ["%1 && {%2}", _parentConditionString, _condition call EFUNC(common,codeToString)];

// don't add already added setting
if (isNil {missionNamespace getVariable _varName}) then {
if ((missionNamespace isNil _varName)) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((missionNamespace isNil _varName)) then {
if (missionNamespace isNil _varName) then {

[_varName, "CHECKBOX", _titleFull, [_settingCategory, _rootActionTitle], false, 2, {}, true] call CBA_fnc_addSetting;
};

Expand Down
8 changes: 4 additions & 4 deletions addons/medical_ai/stateMachine.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ GVAR(stateMachine) = [{call EFUNC(common,getLocalUnits)}, true] call CBA_statema


[GVAR(stateMachine), "HealSelf", "Initial", { // Go back to initial state when done healing
!(call FUNC(isInjured)) && {isNil {_this getVariable QGVAR(currentTreatment)}}
!(call FUNC(isInjured)) && {(_this isNil QGVAR(currentTreatment))}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!(call FUNC(isInjured)) && {(_this isNil QGVAR(currentTreatment))}
!(call FUNC(isInjured)) && {_this isNil QGVAR(currentTreatment)}

}, {
#ifdef DEBUG_MODE_FULL
systemChat format ["%1 finished healing themself", _this];
#endif
}, "Initial"] call CBA_statemachine_fnc_addTransition;

[GVAR(stateMachine), "HealSelf", "Injured", { // Stop treating when it's no more safe
!(call FUNC(isSafe)) && {isNil {_this getVariable QGVAR(currentTreatment)}}
!(call FUNC(isSafe)) && {(_this isNil QGVAR(currentTreatment))}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!(call FUNC(isSafe)) && {(_this isNil QGVAR(currentTreatment))}
!(call FUNC(isSafe)) && {_this isNil QGVAR(currentTreatment)}

}, {
#ifdef DEBUG_MODE_FULL
systemChat format ["%1 is no longer safe", _this];
Expand All @@ -48,15 +48,15 @@ GVAR(stateMachine) = [{call EFUNC(common,getLocalUnits)}, true] call CBA_statema


[GVAR(stateMachine), "HealUnit", "Initial", { // Go back to initial state when done healing or it's no more safe to treat
!((call FUNC(wasRequested)) && FUNC(isSafe)) && {isNil {_this getVariable QGVAR(currentTreatment)}}
!((call FUNC(wasRequested)) && FUNC(isSafe)) && {(_this isNil QGVAR(currentTreatment))}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!((call FUNC(wasRequested)) && FUNC(isSafe)) && {(_this isNil QGVAR(currentTreatment))}
!((call FUNC(wasRequested)) && FUNC(isSafe)) && {_this isNil QGVAR(currentTreatment)}

}, {
#ifdef DEBUG_MODE_FULL
systemChat format ["%1 finished healing someone", _this];
#endif
}, "Initial"] call CBA_statemachine_fnc_addTransition;

[GVAR(stateMachine), "HealUnit", "Injured", { // Treating yourself has priority
(call FUNC(isInjured)) && {isNil {_this getVariable QGVAR(currentTreatment)}}
(call FUNC(isInjured)) && {(_this isNil QGVAR(currentTreatment))}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(call FUNC(isInjured)) && {(_this isNil QGVAR(currentTreatment))}
call FUNC(isInjured) && {_this isNil QGVAR(currentTreatment)}

}, {
#ifdef DEBUG_MODE_FULL
systemChat format ["%1 was injured while healing someone", _this];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

params ["_unit"];
if (isNull _unit || {!isNil {_unit getVariable QEGVAR(medical,causeOfDeath)}}) exitWith {
if (isNull _unit || {!(_unit isNil QEGVAR(medical,causeOfDeath))}) exitWith {
WARNING_1("enteredStateCardiacArrest: State transition on dead or null unit - %1",_unit);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

params ["_unit"];
if (isNull _unit || {!isNil {_unit getVariable QEGVAR(medical,causeOfDeath)}}) exitWith {
if (isNull _unit || {!(_unit isNil QEGVAR(medical,causeOfDeath))}) exitWith {
if ((_unit getVariable [QEGVAR(medical,causeOfDeath), ""]) == "#scripted") exitWith {};
WARNING_1("enteredStateDeath: State transition on dead or null unit - %1",_unit);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

params ["_unit"];
if (isNull _unit || {!isNil {_unit getVariable QEGVAR(medical,causeOfDeath)}}) exitWith {
if (isNull _unit || {!(_unit isNil QEGVAR(medical,causeOfDeath))}) exitWith {
WARNING_1("enteredStateFatalInjury: State transition on dead or null unit - %1",_unit);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
params ["_unit"];

if (isNull _unit || {!isNil {_unit getVariable QEGVAR(medical,causeOfDeath)}}) exitWith {
if (isNull _unit || {!(_unit isNil QEGVAR(medical,causeOfDeath))}) exitWith {
WARNING_1("enteredStateUnconscious: State transition on dead or null unit - %1",_unit);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/medical_treatment/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (["ace_trenches"] call EFUNC(common,isModLoaded)) then {
true
] call CBA_fnc_notify;
},
{!isNil {_target getVariable QGVAR(headstoneData)}}
{!(_target isNil QGVAR(headstoneData))}
] call EFUNC(interact_menu,createAction);

[missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"], 0, [], _checkHeadstoneAction] call EFUNC(interact_menu,addActionToClass);
Expand Down
2 changes: 1 addition & 1 deletion addons/rearm/functions/fnc_makeSource.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (!(_rearmCargoConfig > 0 && _source getVariable [QGVAR(isSupplyVehicle), fals
_source setVariable [QGVAR(isSupplyVehicle), true, true];

// only add if menu does not already exist
if (isNil {_source getVariable QGVAR(initSupplyVehicle_jipID)}) then {
if ((_source isNil QGVAR(initSupplyVehicle_jipID))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_source isNil QGVAR(initSupplyVehicle_jipID))) then {
if (_source isNil QGVAR(initSupplyVehicle_jipID)) then {

private _jipID = [QGVAR(initSupplyVehicle), [_source]] call CBA_fnc_globalEventJIP;
[_jipID, _source] call CBA_fnc_removeGlobalEventJIP;
_source setVariable [QGVAR(initSupplyVehicle_jipID), _jipID];
Expand Down
2 changes: 1 addition & 1 deletion addons/refuel/functions/fnc_getCapacity.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (isNil "_capacity") then {
// Set capacity even if this isn't a fuel source to save on config lookup time in the event this function is used in a loop
_source setVariable [QGVAR(capacity), _capacity, true];
// handle weird edge case when trying to run on "camera"/CfgNonAIVehicles which won't support setVariable and will inf-loop
if (isNil {_source getVariable QGVAR(capacity)}) exitWith { WARNING_1("trying to getCapacity from non-CfgVehicle %1",_this); };
if ((_source isNil QGVAR(capacity))) exitWith { WARNING_1("trying to getCapacity from non-CfgVehicle %1",_this); };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_source isNil QGVAR(capacity))) exitWith { WARNING_1("trying to getCapacity from non-CfgVehicle %1",_this); };
if (_source isNil QGVAR(capacity)) exitWith { WARNING_1("trying to getCapacity from non-CfgVehicle %1",_this); };

[_source, _capacity] call FUNC(setFuel);
};

Expand Down
4 changes: 2 additions & 2 deletions addons/refuel/functions/fnc_makeSource.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (

// We might be removing fuel from an object that in config doesn't have fuel, but was given fuel via this function prior
if (_fuelCargo == REFUEL_DISABLED_FUEL && {_fuelCargoConfig == REFUEL_DISABLED_FUEL}) exitWith {
if (isNil {_source getVariable QGVAR(currentFuelCargo)}) exitWith {};
if ((_source isNil QGVAR(currentFuelCargo))) exitWith {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_source isNil QGVAR(currentFuelCargo))) exitWith {};
if (_source isNil QGVAR(currentFuelCargo)) exitWith {};


_source setVariable [QGVAR(currentFuelCargo), nil, true];
_source setVariable [QGVAR(capacity), REFUEL_DISABLED_FUEL, true];
Expand Down Expand Up @@ -75,7 +75,7 @@ if (
};

// only add if menu doesn't already exist
if (_fuelCargoConfig != REFUEL_DISABLED_FUEL || {!isNil {_source getVariable QGVAR(initSource_jipID)}}) exitWith {};
if (_fuelCargoConfig != REFUEL_DISABLED_FUEL || {!(_source isNil QGVAR(initSource_jipID))}) exitWith {};

private _jipID = [QGVAR(initSource), [_source]] call CBA_fnc_globalEventJIP;
[_jipID, _source] call CBA_fnc_removeGlobalEventJIP;
Expand Down
2 changes: 1 addition & 1 deletion addons/repair/functions/fnc_repair.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ if (_loopAnim) then {
if (_anim isEqualTo (_caller getVariable [QGVAR(repairCurrentAnimCaller), ""])) then {
[{
params ["_caller", "_anim"];
if !(isNil {_caller getVariable QGVAR(repairCurrentAnimCaller)}) then {
if !((_caller isNil QGVAR(repairCurrentAnimCaller))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !((_caller isNil QGVAR(repairCurrentAnimCaller))) then {
if !(_caller isNil QGVAR(repairCurrentAnimCaller)) then {

TRACE_2("loop",_caller,_anim);
call EFUNC(common,doAnimation)
};
Expand Down
4 changes: 2 additions & 2 deletions addons/respawn/functions/fnc_handleInitPostServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private _leaderVarName = _groupUnit getVariable [QGVAR(leaderVarName), ""];
if (_leaderVarName != "") exitWith {
// assign JIP unit as rallypoint leader
if (str _unit == _leaderVarName) then {
if (isNil {_unit getVariable "ACE_canMoveRallypoint"}) then {
if ((_unit isNil "ACE_canMoveRallypoint")) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_unit isNil "ACE_canMoveRallypoint")) then {
if (_unit isNil "ACE_canMoveRallypoint") then {

_unit setVariable ["ACE_canMoveRallypoint", true, true];
};
};
Expand All @@ -61,6 +61,6 @@ if (_leaderVarName == "") then {
// prevent group from getting multiple leaders; use this to assign rallypoint moving ability on JIP
_groupUnit setVariable [QGVAR(leaderVarName), _leaderVarName];

if (isNil {_unit getVariable "ACE_canMoveRallypoint"}) then {
if ((_unit isNil "ACE_canMoveRallypoint")) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_unit isNil "ACE_canMoveRallypoint")) then {
if (_unit isNil "ACE_canMoveRallypoint") then {

_unit setVariable ["ACE_canMoveRallypoint", true, true];
};
2 changes: 1 addition & 1 deletion addons/safemode/functions/fnc_lockSafety.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (_weaponSelected) then {
_safedWeaponMuzzles set [_muzzle, _firemode];

// Lock muzzle
if (isNil {_unit getVariable QGVAR(actionID)}) then {
if ((_unit isNil QGVAR(actionID))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_unit isNil QGVAR(actionID))) then {
if (_unit isNil QGVAR(actionID)) then {

_unit setVariable [QGVAR(actionID), [
_unit, "DefaultAction", {
params ["", "_unit"];
Expand Down
2 changes: 1 addition & 1 deletion addons/sitting/XEH_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (!hasInterface) exitWith {};
} forEach keys (uiNamespace getVariable [QGVAR(seats), []]);

// Add interaction menu exception
["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(sittingStatus)}}] call EFUNC(common,addCanInteractWithCondition);
["isNotSitting", {((_this select 0) isNil QGVAR(sittingStatus))}] call EFUNC(common,addCanInteractWithCondition);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
["isNotSitting", {((_this select 0) isNil QGVAR(sittingStatus))}] call EFUNC(common,addCanInteractWithCondition);
["isNotSitting", {(_this select 0) isNil QGVAR(sittingStatus)}] call EFUNC(common,addCanInteractWithCondition);


// Handle interruptions
["ace_unconscious", LINKFUNC(handleInterrupt)] call CBA_fnc_addEventHandler;
Expand Down
2 changes: 1 addition & 1 deletion addons/sitting/functions/fnc_canSit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params ["_seat", "_player", ["_seatPos", 0]];

// Sitting enabled, not occupied and standing up (or not on a big slope)
XGVAR(enable) &&
{isNil {_player getVariable QGVAR(sittingStatus)}} &&
{(_player isNil QGVAR(sittingStatus))} &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{(_player isNil QGVAR(sittingStatus))} &&
{_player isNil QGVAR(sittingStatus)} &&

{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} && {
private _seatsClaimed = _seat getVariable [QGVAR(seatsClaimed), []];

Expand Down
2 changes: 1 addition & 1 deletion addons/sitting/functions/fnc_canStand.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
params ["_player"];

// Sitting
!isNil {_player getVariable QGVAR(sittingStatus)}
!(_player isNil QGVAR(sittingStatus))
2 changes: 1 addition & 1 deletion addons/sitting/functions/fnc_handleInterrupt.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

params ["_player"];

if (!isNil {_player getVariable QGVAR(sittingStatus)}) then {
if (!(_player isNil QGVAR(sittingStatus))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(_player isNil QGVAR(sittingStatus))) then {
if !(_player isNil QGVAR(sittingStatus)) then {

_player call FUNC(stand);
};
2 changes: 1 addition & 1 deletion addons/sitting/functions/fnc_sit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private _seatDistOrig = (getPosASL _player) distance _seat;
_args params ["_player", "_seat", "_seatPos", "_seatPosOrig", "_seatDistOrig"];

// Remove PFH if not sitting any more
if (isNil {_player getVariable QGVAR(sittingStatus)}) exitWith {
if ((_player isNil QGVAR(sittingStatus))) exitWith {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_player isNil QGVAR(sittingStatus))) exitWith {
if (_player isNil QGVAR(sittingStatus)) exitWith {

[_pfhId] call CBA_fnc_removePerFrameHandler;
TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(sittingStatus),false)]);

Expand Down
2 changes: 1 addition & 1 deletion addons/trenches/functions/fnc_removeTrench.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _trench setVariable [QGVAR(digging), true, true];
private _removeTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(removalDuration)), 12];
private _removeTimeLeft = _removeTime * _actualProgress;

if (isNil {_trench getVariable QGVAR(placeData)}) then {
if ((_trench isNil QGVAR(placeData))) then {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((_trench isNil QGVAR(placeData))) then {
if (_trench isNil QGVAR(placeData)) then {

_trench setVariable [QGVAR(placeData), [getPosASL _trench, [vectorDir _trench, vectorUp _trench]], true];
};
private _placeData = _trench getVariable [QGVAR(placeData), [[], []]];
Expand Down
4 changes: 2 additions & 2 deletions addons/vehicle_damage/functions/fnc_addEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (!GVAR(enabled)) exitWith {
#endif
};

if (!isNil {_vehicle getVariable QGVAR(handleDamage)}) exitWith {};
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {};
if !(_vehicle isNil QGVAR(handleDamage)) exitWith {};


_vehicle allowCrewInImmobile true;

Expand All @@ -33,7 +33,7 @@ _vehicle allowCrewInImmobile true;
[{
params ["_vehicle"];

if (!isNil {_vehicle getVariable QGVAR(handleDamage)}) exitWith {};
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {};
if !(_vehicle isNil QGVAR(handleDamage)) exitWith {};


TRACE_1("added eh",_vehicle);

Expand Down
Loading
Loading