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

Revert "Common - Fix calling getVar on null object in `canInteractWit… #8564

Merged
merged 1 commit into from
Oct 19, 2021
Merged
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
7 changes: 3 additions & 4 deletions addons/common/functions/fnc_canInteractWith.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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), [[],[]]];
Expand Down
4 changes: 1 addition & 3 deletions addons/movement/functions/fnc_handleVirtualMass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down