Fix zeus RC units using player damage treshold (#5219)

* Fix zeus RC units using player damage treshold

Closes #5218

* add pabstmirrors suggestion

use gvar
This commit is contained in:
Cuel 2017-06-02 18:21:57 +02:00 committed by PabstMirror
parent 2712a1ed8a
commit 5b9c70a738

View File

@ -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]];