mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Correct use of medical handleDamage calls
This commit is contained in:
parent
6f630d4c03
commit
6f4b53ed9e
@ -53,12 +53,11 @@ if (_distance < _backblastRange) then {
|
|||||||
_alpha = sqrt (1 - _distance / _backblastRange);
|
_alpha = sqrt (1 - _distance / _backblastRange);
|
||||||
_beta = sqrt 0.5;
|
_beta = sqrt 0.5;
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _backblastDamage;
|
_damage = _alpha * _beta * _backblastDamage;
|
||||||
[_damage * 100] call BIS_fnc_bloodEffect;
|
[_damage * 100] call BIS_fnc_bloodEffect;
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_firer] call EFUNC(medical,hasMedicalEnabled))}) then {
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
[_firer, "HitBody", [_firer, "body", ((_firer getHitPointDamage "HitBody") + _damage), _firer, "backblast"] call EFUNC(medical,handleDamage)] call EFUNC(medical,setHitPointDamage);
|
||||||
[_firer, "HitBody", ([_firer, "", ((_firer getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
} else {
|
} else {
|
||||||
_firer setDamage (damage _firer + _damage);
|
_firer setDamage (damage _firer + _damage);
|
||||||
};
|
};
|
||||||
|
@ -50,18 +50,13 @@ if (!surfaceIsWater _pos) then {
|
|||||||
_alpha = sqrt (1 - _distance / _overpressureRange);
|
_alpha = sqrt (1 - _distance / _overpressureRange);
|
||||||
_beta = sqrt (1 - _angle / _overpressureAngle);
|
_beta = sqrt (1 - _angle / _overpressureAngle);
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _overpressureDamage;
|
_damage = _alpha * _beta * _overpressureDamage;
|
||||||
|
|
||||||
// If the target is the ACE_player
|
// If the target is the ACE_player
|
||||||
if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_x] call EFUNC(medical,hasMedicalEnabled))}) then {
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
[_x, "HitBody", [_x, "body", (_x getHitPointDamage "HitBody") + _damage, _firer, "backblast"] call EFUNC(medical,handleDamage)] call EFUNC(medical,setHitPointDamage);
|
||||||
[_x, "HitBody", ([_x, "", (_x getHitPointDamage "HitBody") + _damage, objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
_x spawn {
|
|
||||||
sleep 0.5;
|
|
||||||
[_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
_x setDamage (damage _x + _damage);
|
_x setDamage (damage _x + _damage);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user