From 5b9c70a738a38396a72e1624b8ac8eb365b60558 Mon Sep 17 00:00:00 2001 From: Cuel Date: Fri, 2 Jun 2017 18:21:57 +0200 Subject: [PATCH] Fix zeus RC units using player damage treshold (#5219) * Fix zeus RC units using player damage treshold Closes #5218 * add pabstmirrors suggestion use gvar --- addons/medical/functions/fnc_determineIfFatal.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 9dbbcce9a6..6a4353ca81 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -30,7 +30,7 @@ if (_part < 0 || _part > 5) exitWith {false}; // Find the correct Damage threshold for unit. private _damageThreshold = [1,1,1]; -if ([_unit] call EFUNC(common,IsPlayer)) then { +if ([_unit, GVAR(remoteControlledAI)] call EFUNC(common,isPlayer)) then { _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]]; } else { _damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]];