mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Med rw handle fire damage (#5100)
* Bundle fire damage into bigger chunks Redo #4223 * Use same values * Decrease combine cuttoff to 0.1
This commit is contained in:
parent
ddccfe563b
commit
f369ffaa04
@ -113,10 +113,26 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith {
|
||||
};
|
||||
_ammo = "#falling";
|
||||
} else {
|
||||
// Assume collision damage.
|
||||
// @todo, find a method for detecting burning damage.
|
||||
_woundedHitPoint = "Body";
|
||||
_ammo = "#collision";
|
||||
if (_receivedDamage > 0.1) then {
|
||||
// Assume collision damage.
|
||||
_woundedHitPoint = "Body";
|
||||
_ammo = "#vehiclecrash";
|
||||
} else {
|
||||
// Probably fire damage:
|
||||
_woundedHitPoint = selectRandom ["LeftLeg", "RightLeg", "Body"];
|
||||
_ammo = "#unknown";
|
||||
private _combinedDamage = _receivedDamage + (_unit getVariable [QGVAR(trivialDamage), 0]);
|
||||
if (_combinedDamage > 0.1) then {
|
||||
// if the new sum is large enough, reset variable and continue with it added in
|
||||
_unit setVariable [QGVAR(trivialDamage), 0];
|
||||
TRACE_2("Using sum of trivialDamage",_receivedDamage,_combinedDamage);
|
||||
_receivedDamage = _combinedDamage;
|
||||
} else {
|
||||
// otherwise just save the new sum into the variable and exit
|
||||
_unit setVariable [QGVAR(trivialDamage), _combinedDamage];
|
||||
_receivedDamage = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user