Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical & Vehicle Damage - Fix end key fix #10410

Merged
merged 2 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/medical_engine/functions/fnc_handleDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ if (_structuralDamage) then {
if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {_oldDamage};

// Killing units via End key is an edge case (#10375)
LinkIsGrim marked this conversation as resolved.
Show resolved Hide resolved
if (_structuralDamage && {_damage == 1 && _ammo == "" && isNull _shooter && isNull _instigator}) exitWith {_damage};
// This didn't matter pre-Arma 3 2.18 but now this goes through the event handler
// 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
if (_structuralDamage && {_damage >= 1 && _ammo == "" && isNull _shooter && isNull _instigator}) exitWith {_damage};

private _newDamage = _damage - _oldDamage;

Expand Down
4 changes: 3 additions & 1 deletion addons/vehicle_damage/functions/fnc_handleDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ TRACE_9("handleDamage",_vehicle,_selection,_newDamage,_source,_projectile,_hitIn
if (!local _vehicle) exitWith {};

// Killing units via End key is an edge case (#10375)
LinkIsGrim marked this conversation as resolved.
Show resolved Hide resolved
if (_context == 0 && {_newDamage == 1 && _projectile == "" && isNull _source && isNull _instigator}) exitWith {_newDamage};
// This didn't matter pre-Arma 3 2.18 but now this goes through the event handler
// 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
if (_context == 0 && {_newDamage >= 1 && _projectile == "" && isNull _source && isNull _instigator}) exitWith {_newDamage};

private _currentDamage = if (_selection != "") then {
_vehicle getHitIndex _hitIndex
Expand Down
Loading