Skip to content

Commit

Permalink
Medical - Fix zeus end keybind not killing units (#10376)
Browse files Browse the repository at this point in the history
fix the thing
  • Loading branch information
LinkIsGrim authored Oct 10, 2024
1 parent e9eabca commit cff838f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/medical_engine/functions/fnc_handleDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ if (_structuralDamage) then {
// Damage can be disabled with old variable or via sqf command allowDamage
if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {_oldDamage};

// Killing units via End key is an edge case (#10375)
if (_structuralDamage && {_damage == 1 && _ammo == "" && isNull _shooter && isNull _instigator}) exitWith {_damage};

private _newDamage = _damage - _oldDamage;

// _newDamage == 0 happens occasionally for vehiclehit events (see line 80 onwards), just exit early to save some frametime
Expand Down

0 comments on commit cff838f

Please sign in to comment.