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 <[email protected]>
  • Loading branch information
2 people authored and LinkIsGrim committed Nov 2, 2024
1 parent b6caaf3 commit c58d357
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 c58d357

Please sign in to comment.