mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
add wound texture handling
This commit is contained in:
parent
68f9ea2d2f
commit
884bccf1cb
@ -40,6 +40,17 @@ if (_isInRemainsCollector) then {
|
||||
removeFromRemainsCollector [_target];
|
||||
};
|
||||
|
||||
// Make sure clone has the same wound textures as the corpse
|
||||
private _targetDamage = damage _target;
|
||||
if (_targetDamage != 0) then {
|
||||
_clone setDamage (_targetDamage min 0.99); // Don't kill the clone
|
||||
};
|
||||
private _relevantHitpoints = ["HitHead", "HitBody", "HitHands", "HitLegs"];
|
||||
{
|
||||
private _hitpointDamage = _target getHitPointDamage _x;
|
||||
_clone setHitPointDamage [_x, _hitpointDamage min 0.99];
|
||||
} forEach _relevantHitpoints;
|
||||
|
||||
// Disable all damage
|
||||
_clone allowDamage false;
|
||||
_clone setVariable [QGVAR(original), [_target, _isInRemainsCollector, _isObjectHidden], true];
|
||||
|
Loading…
Reference in New Issue
Block a user