Skip to content

Commit

Permalink
Dragging - Minor optimisation (#9679)
Browse files Browse the repository at this point in the history
Minor optimisation for dragging
  • Loading branch information
johnb432 authored Dec 18, 2023
1 parent 1b6b0aa commit e8c10f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/dragging/functions/fnc_canCarry.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (_target isKindOf "StaticWeapon") exitWith {

// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues
if (_target isKindOf "CAManBase") exitWith {
!(alive _target != isAwake _target) &&
isAwake _target && // not ragdolled
{lifeState _target == "INCAPACITATED" ||
{_target getHitPointDamage "HitLegs" >= 0.5}}
};
Expand Down
2 changes: 1 addition & 1 deletion addons/dragging/functions/fnc_canDrag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (_target isKindOf "StaticWeapon") exitWith {

// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues
if (_target isKindOf "CAManBase") exitWith {
!(alive _target != isAwake _target) &&
isAwake _target && // not ragdolled
{lifeState _target == "INCAPACITATED" ||
{_target getHitPointDamage "HitLegs" >= 0.5}}
};
Expand Down

0 comments on commit e8c10f9

Please sign in to comment.