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

Helmet loss chance fix #310

Merged
merged 1 commit into from
Sep 15, 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
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