Skip to content

Commit

Permalink
Dragging - Fix dead body weapon carrying (#10435)
Browse files Browse the repository at this point in the history
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
  • Loading branch information
Dystopian and johnb432 authored Nov 2, 2024
1 parent fd1ade0 commit 609b2fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/dragging/functions/fnc_canCarry.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ params ["_unit", "_target"];
private _alive = alive _target;
private _isPerson = _target isKindOf "CAManBase";

if !((_alive || _isPerson) && {_target getVariable [QGVAR(canCarry), false]} && {isNull objectParent _target}) exitWith {false};
if !(
(_alive || _isPerson)
&& {_target getVariable [QGVAR(canCarry), false]}
&& {isNull objectParent _target || {!isNull getCorpse _target}}
) exitWith {false};

if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};

Expand Down

0 comments on commit 609b2fe

Please sign in to comment.