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

Various - Conform isNil checks across the codebase #7523

Merged
merged 22 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from 18 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
4 changes: 2 additions & 2 deletions addons/arsenal/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GVAR(lastSearchTextLoadouts) = "";
[QGVAR(loadoutUnshared), {
params ["_contentPanelCtrl" , "_playerName", "_loadoutName"];

if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {
if ((!isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {

private _dataToCheck = _playerName + _loadoutName;

Expand Down Expand Up @@ -52,7 +52,7 @@ GVAR(lastSearchTextLoadouts) = "";
params ["_contentPanelCtrl" ,"_loadoutArgs"];
_loadoutArgs params ["_playerName", "_loadoutName", "_loadoutData"];

if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {
if ((!isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {

private _curSelData =_contentPanelCtrl lnbData [(lnbCurSelRow _contentPanelCtrl), 1];
([_loadoutData] call FUNC(verifyLoadout)) params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount"];
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ params ["_display", "_control"];

private _ctrlIDC = ctrlIDC _control;

if !(isNil QGVAR(currentLeftPanel)) then {
if (!isNil QGVAR(currentLeftPanel)) then {
private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1);
_previousCtrlBackground ctrlSetFade 1;
_previousCtrlBackground ctrlCommit FADE_DELAY;
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_fillRightPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ params ["_display", "_control"];
private _ctrlIDC = ctrlIDC _control;

// Fade old control background
if !(isNil QGVAR(currentRightPanel)) then {
if (!isNil QGVAR(currentRightPanel)) then {
private _previousCtrlBackground = _display displayCtrl (GVAR(currentRightPanel) - 1);
_previousCtrlBackground ctrlSetFade 1;
_previousCtrlBackground ctrlCommit FADE_DELAY;
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_handleStats.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private _hideUnusedFnc = {
} forEach _numbers;
};

if !(isNil "_itemCfg") then {
if (!isNil "_itemCfg") then {

private _handleStatsFnc = {
params ["_statsIndex", "_leftPanel"];
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_message.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ params ["_display", "_message"];
private _messageBoxCtrl = _display displayCtrl IDC_message;
private _handle = _messageBoxCtrl getVariable QGVAR(messageBoxHandle);

if !(isNil "_handle") then {
if (!isNil "_handle") then {
terminate _handle;
};

Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_onSelChangedLeft.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ private _display = ctrlParent _control;
private _item = [_control lnbData [_curSel, 0], _control lbData _curSel] select !(ctrlType _control == 102);

private _weaponDefaultRightPanel = _display displayCtrl IDC_buttonOptic;
private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!(isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]});
private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select ((!isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]});

private _containerDefaultRightPanel = _display displayCtrl IDC_buttonMisc;
private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!(isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]});
private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select ((!isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]});

private _fnc_clearPreviousWepMags = {
private _compatibleMags = getArray (configfile >> "cfgweapons" >> _baseWeapon >> "magazines");
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_removeBox.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (isNull _object || {isNil QGVAR(EHIDArray)}) exitWith {};
if (_global && {isMultiplayer}) then {
private _ID = (GVAR(EHIDArray) select {_x select 1 == _object}) select 0;

if !(isNil "_ID") then {
if (!isNil "_ID") then {
[_ID select 0] call CBA_fnc_removeGlobalEventJIP;
GVAR(EHIDArray) deleteAt (GVAR(EHIDArray) find _ID);
publicVariable QGVAR(EHIDArray);
Expand Down
2 changes: 1 addition & 1 deletion addons/cargo/functions/fnc_removeCargoItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private _continue = if (_item isEqualType objNull) then {
};
} forEach _loaded;

FILTER(_loaded,_x != nil);
FILTER(_loaded,!isNil "_x");
true
};

Expand Down
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_cbaSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GVAR(settingsMovedToSQF) = [];
#ifdef DEBUG_MODE_FULL
INFO_1("checking settingsMovedToSQF [%1]",count GVAR(settingsMovedToSQF));
{
if (isNil _x) then { WARNING_1("setting [%1] NOT moved to sqf",_x); };
if (isNil "_x") then { WARNING_1("setting [%1] NOT moved to sqf",_x); };
} forEach GVAR(settingsMovedToSQF);
#endif
}] call CBA_fnc_addEventHandler;
Expand Down Expand Up @@ -107,7 +107,7 @@ for "_index" from 0 to (_countOptions - 1) do {
if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then {
WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName);
} else {
if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then {
if ((isNil "_settingName") && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then {
// New setting, that was first defined in missionConfigFile
INFO_1("Creating new CBA setting for ace_setting from mission config [%1]",_settingName);
[_optionEntry] call FUNC(cbaSettings_loadFromConfig);
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_parseList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (_checkNil) then {
private _nilCheckedList = [];

{
if !(isNil _x) then {
if (!isNil "_x") then {
_nilCheckedList pushBack (missionNamespace getVariable _x);
};
false
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 @@ -22,7 +22,7 @@
params ["_logic", "_settingName", "_moduleVariable"];

// Check if the variable is already defined
if (isNil _settingName) exitWith {
if (isNil "_settingName") exitWith {
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
TRACE_3("ace_setting",_title,_settingName,_settingValue);

// Check if the variable is already defined
if (isNil _settingName) exitWith {
if (isNil "_settingName") exitWith {
ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_receiveRequest.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (isLocalized _requestMessage) then {

hint format ["%1", _requestMessage]; // @todo ?

if !(isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
};

Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_resetAllDefaults.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _unit setVariable ["ACE_isUnconscious", nil, true];
if (isPlayer _unit) then {
[true] call FUNC(setVolume);

if !(isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
if (!isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
// clear all disable user input
{
[_x, false] call FUNC(setDisableUserInputStatus);
Expand Down
2 changes: 1 addition & 1 deletion addons/fastroping/functions/fnc_onRopeBreak.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private _unit = {
if (_x isKindOf "CAManBase") exitWith {_x};
} forEach (attachedObjects (_brokenRope select 3));

if !(isNil "_unit") then {
if (!isNil "_unit") then {
if (_part == "top") then {
detach _unit;
} else {
Expand Down
2 changes: 1 addition & 1 deletion addons/gunbag/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PREP_RECOMPILE_END;

[QEGVAR(arsenal,displayClosed), {

if !(isNil QGVAR(arsenalCache)) then {
if (!isNil QGVAR(arsenalCache)) then {
(backpackContainer EGVAR(arsenal,center)) setVariable [QGVAR(gunbagWeapon),GVAR(arsenalCache), true];
};

Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/functions/fnc_compileMenu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (_target isEqualType objNull) then {
private _namespace = GVAR(ActNamespace);

// Exit if the action menu is already compiled for this class
if !(isNil {_namespace getVariable _objectType}) exitWith {};
if (!isNil {_namespace getVariable _objectType}) exitWith {};

if (_objectType isKindOf "VirtualMan_F") exitWith { // these have config: isPlayableLogic = 1
TRACE_1("skipping playable logic",_objectType);
Expand All @@ -41,7 +41,7 @@ private _recurseFnc = {

{
private _entryCfg = _x;
if(isClass _entryCfg) then {
if (isClass _entryCfg) then {
private _displayName = getText (_entryCfg >> "displayName");
private _distance = _parentDistance;
if (isNumber (_entryCfg >> "distance")) then {_distance = getNumber (_entryCfg >> "distance");};
Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (_target isEqualType objNull) then {
private _namespace = GVAR(ActSelfNamespace);

// Exit if the action menu is already compiled for this class
if !(isNil {_namespace getVariable _objectType}) exitWith {};
if (!isNil {_namespace getVariable _objectType}) exitWith {};


private _recurseFnc = {
Expand All @@ -34,7 +34,7 @@ private _recurseFnc = {

{
private _entryCfg = _x;
if(isClass _entryCfg) then {
if (isClass _entryCfg) then {
private _displayName = getText (_entryCfg >> "displayName");

private _icon = if (isArray (_entryCfg >> "icon")) then {
Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/functions/fnc_compileMenuZeus.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/

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

private _recurseFnc = {
params ["_actionsCfg"];
private _actions = [];

{
private _entryCfg = _x;
if(isClass _entryCfg) then {
if (isClass _entryCfg) then {
private _displayName = getText (_entryCfg >> "displayName");

private _icon = if (isArray (_entryCfg >> "icon")) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/laser/functions/fnc_shootRay.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (!(_intersects isEqualTo [])) then {
TRACE_3("", _resultPos, _distance, _intersects);

#ifdef DRAW_LASER_INFO
if !(isNil "_resultPos") then {
if (!isNil "_resultPos") then {
private _text = [_distance, 4, 0] call CBA_fnc_formatNumber;
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [0, 1, 0, 1], ASLtoAGL _resultPos, 0.5, 0.5, 0, _text, 0.4, 0.025, "TahomaB"];
drawLine3D [ASLtoAGL _posASL, ASLtoAGL _resultPos, [0,1,0,1]];
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_feedback/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ GVAR(bloodTickCounter) = 0;
#ifdef DISABLE_VANILLA_DAMAGE_EFFECTS
TRACE_1("disabling vanilla bleeding feedback effects",_this);
[{
{isNil _x} count [
{isNil "_x"} count [
"BIS_fnc_feedback_damageCC",
"BIS_fnc_feedback_damageRadialBlur",
"BIS_fnc_feedback_damageBlur"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if !(_overdosedMedications isEqualTo []) then {
TRACE_1("CriticalVitals Event",_target); // make unconscious
[QEGVAR(medical,CriticalVitals), _target] call CBA_fnc_localEvent;
};
if (isNil _onOverDose) then {
if (isNil "_onOverDose") then {
_onOverDose = compile _onOverDose;
} else {
_onOverDose = missionNamespace getVariable _onOverDose;
Expand Down
2 changes: 1 addition & 1 deletion addons/modules/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getNumber (_config >> "isGlobal") > 1;
private _isSingular = getNumber (_config >> "isSingular") > 0;
private _function = getText (_config >> "function");
if (isNil _function) then {
if (isNil "_function") then {
_function = compile _function;
} else {
_function = missionNamespace getVariable _function;
Expand Down
2 changes: 1 addition & 1 deletion addons/overpressure/functions/fnc_firedEHBB.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil

// Bake variable name and check if the variable exists, call the caching function otherwise
private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine];
private _var = if (isNil _varName) then {
private _var = if (isNil "_varName") then {
[_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues);
} else {
missionNameSpace getVariable _varName;
Expand Down
2 changes: 1 addition & 1 deletion addons/overpressure/functions/fnc_firedEHOP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil

// Bake variable name and check if the variable exists, call the caching function otherwise
private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine];
private _var = if (isNil _varName) then {
private _var = if (isNil "_varName") then {
[_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues);
} else {
missionNameSpace getVariable _varName;
Expand Down
2 changes: 1 addition & 1 deletion addons/overpressure/functions/fnc_overpressureDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ params ["_firer", "_posASL", "_direction", "_weapon", "_magazine", "_ammo"];

// Bake variable name and check if the variable exists, call the caching function otherwise
private _varName = format [QGVAR(values%1%2%3), _weapon, _ammo, _magazine];
private _var = if (isNil _varName) then {
private _var = if (isNil "_varName") then {
[_weapon, _ammo, _magazine] call FUNC(cacheOverPressureValues);
} else {
missionNameSpace getVariable _varName;
Expand Down
2 changes: 1 addition & 1 deletion addons/rearm/functions/fnc_readSupplyCounter.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (GVAR(supply) == 1) then {
private _numChars = count (localize LSTRING(Hint_RemainingAmmo));
private _text = "";
private _magazines = _truck getVariable QGVAR(magazineSupply);
if !(isNil "_magazines") then {
if (!isNil "_magazines") then {
{
_x params ["_magazineClass", "_rounds"];
private _line = format ["%1: %2", _magazineClass call FUNC(getMagazineName), _rounds];
Expand Down
4 changes: 2 additions & 2 deletions addons/repair/functions/fnc_canRepair.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa
private _return = true;
if (getText (_config >> "condition") != "") then {
private _condition = getText (_config >> "condition");
if (isNil _condition) then {
if (isNil "_condition") then {
_condition = compile _condition;
} else {
_condition = missionNamespace getVariable _condition;
Expand Down Expand Up @@ -77,7 +77,7 @@ if (!("All" in _repairLocations)) then {
if (_x == "field") exitWith {_return = true;};
if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;};
if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;};
if !(isNil _x) exitWith {
if (!isNil "_x") exitWith {
private _val = missionNamespace getVariable _x;
if (_val isEqualType 0) then {
_return = switch (_val) do {
Expand Down
8 changes: 4 additions & 4 deletions addons/repair/functions/fnc_repair.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {fa
private _return = true;
if (getText (_config >> "condition") != "") then {
private _condition = getText (_config >> "condition");
if (isNil _condition) then {
if (isNil "_condition") then {
_condition = compile _condition;
} else {
_condition = missionNamespace getVariable _condition;
Expand Down Expand Up @@ -82,7 +82,7 @@ if (!("All" in _repairLocations)) then {
if (_x == "field") exitWith {_return = true;};
if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;};
if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;};
if !(isNil _x) exitWith {
if (!isNil "_x") exitWith {
private _val = missionNamespace getVariable _x;
if (_val isEqualType 0) then {
_return = switch (_val) do {
Expand Down Expand Up @@ -139,7 +139,7 @@ if (_callbackProgress == "") then {
(alive _target) && {(abs speed _target) < 1} // make sure vehicle doesn't drive off
};
} else {
if (isNil _callbackProgress) then {
if (isNil "_callbackProgress") then {
_callbackProgress = compile _callbackProgress;
} else {
_callbackProgress = missionNamespace getVariable _callbackProgress;
Expand Down Expand Up @@ -192,7 +192,7 @@ if (_repairTime < 0) then {
} else {
if (isText (_config >> "repairingTime")) exitWith {
private _repairTimeConfig = getText (_config >> "repairingTime");
if (isNil _repairTimeConfig) then {
if (isNil "_repairTimeConfig") then {
_repairTimeConfig = compile _repairTimeConfig;
} else {
_repairTimeConfig = missionNamespace getVariable _repairTimeConfig;
Expand Down
2 changes: 1 addition & 1 deletion addons/repair/functions/fnc_repair_failure.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (_weaponSelect != "") then {
private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);

private _callback = getText (_config >> "callbackFailure");
if (isNil _callback) then {
if (isNil "_callback") then {
_callback = compile _callback;
} else {
_callback = missionNamespace getVariable _callback;
Expand Down
2 changes: 1 addition & 1 deletion addons/repair/functions/fnc_repair_success.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (_weaponSelect != "") then {
private _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);

private _callback = getText (_config >> "callbackSuccess");
if (isNil _callback) then {
if (isNil "_callback") then {
_callback = compile _callback;
} else {
_callback = missionNamespace getVariable _callback;
Expand Down
2 changes: 1 addition & 1 deletion addons/respawn/functions/fnc_initRallypoint.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params ["_rallypoint", "_respawnMarker", "_side"];

private _name = typeOf _rallypoint;

if (isNil _name) then {
if (isNil "_name") then {
missionNamespace setVariable [_name, _rallypoint];

_rallypoint setVariable [QGVAR(side), _side];
Expand Down
2 changes: 1 addition & 1 deletion addons/scopes/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer;
_layer cutText ["", "PLAIN", 0];

if !(isNil QGVAR(fadePFH)) then {
if (!isNil QGVAR(fadePFH)) then {
[GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler;
GVAR(fadePFH) = nil;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/scopes/functions/fnc_showZeroing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (GVAR(simplifiedZeroing)) then {
// Set the time when to hide the knobs
GVAR(timeToHide) = diag_tickTime + 3.0;

if !(isNil QGVAR(fadePFH)) exitWith {};
if (!isNil QGVAR(fadePFH)) exitWith {};

// Launch a PFH to wait and fade out the knobs
GVAR(fadePFH) = [{
Expand Down
2 changes: 1 addition & 1 deletion addons/spectator/functions/fnc_getCameraAttributes.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Public: Yes
*/

if !(isNil QGVAR(camera)) then {
if (!isNil QGVAR(camera)) then {
[GVAR(camMode), GVAR(camFocus), GVAR(camVision), getPosATL GVAR(camera), getDirVisual GVAR(camera)]
} else {
// These values could be pre-set by function
Expand Down
Loading