fixed handleDamage basic

This commit is contained in:
Glowbal 2015-04-17 22:21:15 +02:00
parent 6d18e484c1
commit f5effca216
2 changed files with 6 additions and 6 deletions

View File

@ -36,12 +36,6 @@ if !(_selection in (GVAR(SELECTIONS) + [""])) exitWith {0};
_damageReturn = _damage;
if (GVAR(level) < 2) then {
if ([_unit] call EFUNC(common,isPlayer)) then {
_this set [2, _damage / (GVAR(playerDamageThreshold) max 0.01)];
} else {
_this set [2, _damage / (GVAR(AIDamageThreshold) max 0.01)];
};
_damageReturn = _this call FUNC(handleDamage_basic);
};

View File

@ -63,6 +63,12 @@ if (_selectionName in GVAR(SELECTIONS)) then {
_newDamage = _damage - (_unit getHitPointDamage (GVAR(HITPOINTS) select (GVAR(SELECTIONS) find _selectionName)));
};
if ([_unit] call EFUNC(common,isPlayer)) then {
_newDamage = _newDamage / (GVAR(playerDamageThreshold) max 0.01);
} else {
_newDamage = _newDamage / (GVAR(AIDamageThreshold) max 0.01);
};
_damage = _damage - _newDamage;