Skip to content

Commit

Permalink
Update XEH_postInit.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyBagpipes authored Oct 26, 2023
1 parent 1257723 commit db18064
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions addons/hitreactions/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ if (isNil QGVAR(undroppableGuns)) then {GVAR(undroppableGuns) = DEFAULT_UNDROPPA
params ["", "", "", "", "", "", "_projectile"];
if (GVAR(weaponDropChanceGunHit) + GVAR(weaponDropChanceArmHit) == 0) exitWith {};
private _roll = random 1;
private _willDropGun = _roll < GVAR(weaponDropChanceGunHit);
private _willDropArm = _roll < GVAR(weaponDropChanceArmHit);
if (!(_willDropGun || _willDropArm)) exitWith {};
if (!(_roll < GVAR(weaponDropChanceGunHit) || _roll < GVAR(weaponDropChanceArmHit))) exitWith {};
_projectile addEventHandler ["HitPart", {
params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius" ,"_surfaceType"];
[_surfaceType, _components, _pos] call FUNC(checkWeaponDrop);
Expand All @@ -34,9 +32,7 @@ if (!hasInterface) exitWith {};
params ["", "", "", "", "", "", "_projectile"];
if (GVAR(weaponDropChanceGunHit) + GVAR(weaponDropChanceArmHit) == 0) exitWith {};
private _roll = random 1;
private _willDropGun = _roll < GVAR(weaponDropChanceGunHit);
private _willDropArm = _roll < GVAR(weaponDropChanceArmHit);
if (!(_willDropGun && _willDropArm)) exitWith {};
if (!(_roll < GVAR(weaponDropChanceGunHit) || _roll < GVAR(weaponDropChanceArmHit))) exitWith {};
_projectile addEventHandler ["HitPart", {
params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_components", "_radius" ,"_surfaceType"];
[_surfaceType, _components, _pos] call FUNC(checkWeaponDrop);
Expand Down

0 comments on commit db18064

Please sign in to comment.