Skip to content

Commit

Permalink
fixed helmetLossChance not working
Browse files Browse the repository at this point in the history
  • Loading branch information
UAC-MaxxLite committed Sep 1, 2024
1 parent 4556102 commit 6efe29d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion A3A/addons/core/functions/Revive/fn_handleDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ params ["_unit","_part","_damage","_injurer","_projectile","_hitIndex","_instiga

// Functionality unrelated to Antistasi revive
// Helmet popping: use _hitpoint rather than _part to work around ACE calling its fake hitpoint "head"
if (_damage >= 1 && {_hitPoint == "hithead"}) then
private _randomNumber = [1,100] call BIS_fnc_randomNum;
if (_damage >= 1 && {_hitPoint == "hithead"} && {helmetLossChance >= _randomNumber}) then
{
if (headgear _unit isNotEqualTo "") then
{
Expand Down
3 changes: 2 additions & 1 deletion A3A/addons/core/functions/Revive/fn_handleDamageAAF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ params ["_unit","_part","_damage","_injurer","_projectile","_hitIndex","_instiga
// Functionality unrelated to Antistasi revive
if (side group _injurer == teamPlayer) then
{
private _randomNumber = [1,100] call BIS_fnc_randomNum;
// Helmet popping: use _hitpoint rather than _part to work around ACE calling its fake hitpoint "head"
if (_damage >= 1 && {_hitPoint == "hithead"}) then
if (_damage >= 1 && {_hitPoint == "hithead"} && {helmetLossChance >= _randomNumber}) then
{
if (headgear _unit isNotEqualTo "") then
{
Expand Down

0 comments on commit 6efe29d

Please sign in to comment.