Skip to content

Commit

Permalink
Fix using END key in zeus on units (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako authored Oct 13, 2024
1 parent 5aa9a2f commit cef53c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addons/main/functions/fnc_handleDamageEh.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "script_component.hpp"
params ["_unit", "", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
params ["_unit", "", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint", "", "_context"];
// params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
if !(local _unit) exitWith {nil};

Expand All @@ -13,8 +13,11 @@ if (_hitPoint isEqualTo "") then {

if (GVAR(damageEhVariant) isNotEqualTo 1 || {!(isDamageAllowed _unit)}) exitWith {_curDamage};

// Zeus END key kill
if (_context == 0 && {_damage == 1 && _projectile == "" && isNull _source && isNull _instigator}) exitWith {_damage};

private _newDamage = _damage - _curDamage;
if (_newDamage < 1E-3) exitWith {
if (_context != 2 && {_context == 4 || _newDamage == 0} || {_newDamage < 1E-3}) exitWith {
_curDamage
};

Expand Down

0 comments on commit cef53c6

Please sign in to comment.