From af6b084ba332a1f0701361b29fa8b207ee0a5423 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 28 Jan 2016 23:05:55 -0600 Subject: [PATCH] Don't allow carrying with injured legs Fix #2644 --- addons/dragging/functions/fnc_canCarry.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index eecf4d0aad..381940a9df 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -20,6 +20,10 @@ params ["_unit", "_target"]; if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; +//#2644 - Units with injured legs cannot bear the extra weight of carrying an object +//The fireman carry animation does not slow down for injured legs, so you could carry and run +if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; + // a static weapon has to be empty for dragging (ignore UAV AI) if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false};