From 38e459a155d3a6142d9a7c54bbf6ccaeaf6a240f Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:41:38 +0200 Subject: [PATCH] Update fnc_handleDamage.sqf --- addons/vehicle_damage/functions/fnc_handleDamage.sqf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/vehicle_damage/functions/fnc_handleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleDamage.sqf index 733d4f23214..09a2b6f4c2b 100644 --- a/addons/vehicle_damage/functions/fnc_handleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDamage.sqf @@ -22,11 +22,14 @@ * Public: No */ -params ["_vehicle", "_selection", "_newDamage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; -TRACE_8("handleDamage",_vehicle,_selection,_newDamage,_source,_projectile,_hitIndex,_instigator,_hitPoint); +params ["_vehicle", "_selection", "_newDamage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint", "", "_context"]; +TRACE_9("handleDamage",_vehicle,_selection,_newDamage,_source,_projectile,_hitIndex,_instigator,_hitPoint,_context); if (!local _vehicle) exitWith {}; +// Killing units via End key is an edge case (#10375) +if (_context == 0 && {_newDamage == 1 && _projectile == "" && isNull _source && isNull _instigator}) exitWith {_newDamage}; + private _currentDamage = if (_selection != "") then { _vehicle getHitIndex _hitIndex } else {