Skip to content

Commit

Permalink
Fix zeus RC units using player damage treshold (#5219)
Browse files Browse the repository at this point in the history
* Fix zeus RC units using player damage treshold

Closes #5218

* add pabstmirrors suggestion

use gvar
  • Loading branch information
Cuel authored and PabstMirror committed Jun 2, 2017
1 parent 2712a1e commit 5b9c70a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/medical/functions/fnc_determineIfFatal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
Expand Down

0 comments on commit 5b9c70a

Please sign in to comment.