-
Notifications
You must be signed in to change notification settings - Fork 745
General - Optimize isNil
/getVariable
checks
#11083
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
base: master
Are you sure you want to change the base?
Conversation
if (isNull _object) exitWith {}; | ||
|
||
if (_global && {isMultiplayer} && {isNil {_object getVariable QGVAR(initBoxJIP)}}) then { | ||
if (_global && {isMultiplayer} && {(_object isNil QGVAR(initBoxJIP))}) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (_global && {isMultiplayer} && {(_object isNil QGVAR(initBoxJIP))}) then { | |
if (_global && isMultiplayer && {_object isNil QGVAR(initBoxJIP)}) then { |
}; | ||
|
||
if (isNil {GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars)}) then { | ||
if ((GVAR(sharedLoadoutsNamespace) isNil QGVAR(sharedLoadoutsVars))) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((GVAR(sharedLoadoutsNamespace) isNil QGVAR(sharedLoadoutsVars))) then { | |
if (GVAR(sharedLoadoutsNamespace) isNil QGVAR(sharedLoadoutsVars)) then { |
}; | ||
|
||
if (isNil {profileNamespace getVariable QGVAR(saved_loadouts)}) then { | ||
if ((profileNamespace isNil QGVAR(saved_loadouts))) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((profileNamespace isNil QGVAR(saved_loadouts))) then { | |
if (profileNamespace isNil QGVAR(saved_loadouts)) then { |
|
||
// If items were set globally, do not add items locally | ||
if (isNil {_object getVariable QGVAR(virtualItems)}) then { | ||
if ((_object isNil QGVAR(virtualItems))) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((_object isNil QGVAR(virtualItems))) then { | |
if (_object isNil QGVAR(virtualItems)) then { |
}; | ||
// check for pre-3.16 sway factors being added | ||
if (!isNil {missionNamespace getVariable "ACE_setCustomAimCoef"}) then { | ||
if (!(missionNamespace isNil "ACE_setCustomAimCoef")) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!(missionNamespace isNil "ACE_setCustomAimCoef")) then { | |
if !(missionNamespace isNil "ACE_setCustomAimCoef") then { |
|
||
// Remove PFH if not sitting any more | ||
if (isNil {_player getVariable QGVAR(sittingStatus)}) exitWith { | ||
if ((_player isNil QGVAR(sittingStatus))) exitWith { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((_player isNil QGVAR(sittingStatus))) exitWith { | |
if (_player isNil QGVAR(sittingStatus)) exitWith { |
private _removeTimeLeft = _removeTime * _actualProgress; | ||
|
||
if (isNil {_trench getVariable QGVAR(placeData)}) then { | ||
if ((_trench isNil QGVAR(placeData))) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((_trench isNil QGVAR(placeData))) then { | |
if (_trench isNil QGVAR(placeData)) then { |
}; | ||
|
||
if (!isNil {_vehicle getVariable QGVAR(handleDamage)}) exitWith {}; | ||
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {}; | |
if !(_vehicle isNil QGVAR(handleDamage)) exitWith {}; |
params ["_vehicle"]; | ||
|
||
if (!isNil {_vehicle getVariable QGVAR(handleDamage)}) exitWith {}; | ||
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!(_vehicle isNil QGVAR(handleDamage))) exitWith {}; | |
if !(_vehicle isNil QGVAR(handleDamage)) exitWith {}; |
TRACE_1("params",_unit); | ||
|
||
if (isNil {_unit getVariable |
||
if ((_unit isNil "ACE_airTemperatureBias")) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((_unit isNil "ACE_airTemperatureBias")) then { | |
if (_unit isNil "ACE_airTemperatureBias") then { |
No description provided.