You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,13 +42,21 @@ if !(isDamageAllowed _unit && {_unit getVariable ["ace_medical_allowDamage", tru
40
42
// Killing units via End key is an edge case (#10375)
41
43
// This didn't matter pre-Arma 3 2.18 but now this goes through the event handler
42
44
// TODO: Structural fire damage >= 1 in a single damage event could still be caught here and we don't want that, but we haven't found a better way to catch this, fire damage should be small most of the time anyway
45
+
// Also triggers for catastrophic vehicle explosions which would kill crew outright, check for blocking
43
46
private_newDamage=_damage-_oldDamage;
44
-
if (_structuralDamage&& {(abs (_newDamage-1)) <0.001&&_ammo==""&&isNull_shooter&&isNull_instigator}) exitWith {_damage};
47
+
if (_structuralDamage&& {(abs (_newDamage-1)) <0.001&&_ammo==""&&isNull_shooter&&isNull_instigator}&& {INSTAKILL_ALLOWED(_unit)}) exitWith {_damage};
45
48
46
49
// _newDamage == 0 happens occasionally for vehiclehit events (see line 80 onwards), just exit early to save some frametime
47
50
// context 4 is engine "bleeding". For us, it's just a duplicate event for #structural which we can ignore without any issues
51
+
// Leverage this to block insta-kills on the same frame (see above)
48
52
if (_context!=2&& {_context==4||_newDamage==0}) exitWith {
49
53
TRACE_4("Skipping engine bleeding or zero damage",_ammo,_newDamage,_directHit,_context);
0 commit comments