From d94943a9ff897f097a2253cce61cdb386c2166ec Mon Sep 17 00:00:00 2001 From: Glowbal Date: Thu, 9 Apr 2015 21:38:35 +0200 Subject: [PATCH] getting hitpoint damage on non existing hitpoint returns type instead of bool --- addons/dragging/functions/fnc_canCarry.sqf | 2 +- addons/dragging/functions/fnc_canDrag.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 41fe91cc42..4067b366d6 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -22,4 +22,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false}; -alive _target && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || ((_target getHitPointDamage "HitLeftLeg") + (_target getHitPointDamage "HitRightLeg") > 0.4)} +alive _target && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLeftLeg") + (_target getHitPointDamage "HitRightLeg") > 0.4})} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 95ce15222b..dc2d64168b 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -22,4 +22,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false}; -alive _target && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || ((_target getHitPointDamage "HitLeftLeg") + (_target getHitPointDamage "HitRightLeg") > 0.4)} +alive _target && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLeftLeg") + (_target getHitPointDamage "HitRightLeg") > 0.4})}; \ No newline at end of file