Revert "Common - Fix calling getVar on null object in canInteractWith (#8532)" (#8564)

This reverts commit a0e9f6015b.
This commit is contained in:
PabstMirror 2021-10-19 13:17:59 -05:00 committed by GitHub
parent f818261052
commit 8cdf0b2c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -21,11 +21,10 @@ params ["_unit", "_target", ["_exceptions", []]];
_exceptions = _exceptions apply {toLower _x};
private _owner = _target getVariable [QGVAR(owner), objNull];
// exit if the target is not free to interact
if ((!isNull _target) && {
private _owner = _target getVariable [QGVAR(owner), objNull];
(!isNull _owner) && {_unit != _owner}}
) exitWith {false};
if (!isNull _owner && {_unit != _owner}) exitWith {false};
// check general conditions
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];

View File

@ -23,9 +23,7 @@ if (isNull _unit) exitWith {};
private _virtualLoad = 0;
{
if (!isNull _x) then {
_virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
};
_virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]);
} forEach [
_unit,
uniformContainer _unit,