diff --git a/addons/grenades/CfgAmmo.hpp b/addons/grenades/CfgAmmo.hpp index 12f9b54c20..74f0677c3c 100644 --- a/addons/grenades/CfgAmmo.hpp +++ b/addons/grenades/CfgAmmo.hpp @@ -2,13 +2,8 @@ class CfgAmmo { class Default; class Grenade: Default { - soundImpactSoft1[] = {"",1,1,1}; - soundImpactSoft2[] = {"",1,1,1}; - soundImpactSoft3[] = {"",1,1,1}; - soundImpactSoft4[] = {"",1,1,1}; - soundImpactSoft5[] = {"",1,1,1}; - soundImpactSoft6[] = {"",1,1,1}; - soundImpactSoft7[] = {"",1,1,1}; + GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\grenades\Grenade_PullPin.wss", 1.5, 1, 10}; + impactGroundSoft[] = {}; }; class FlareCore; @@ -62,6 +57,7 @@ class CfgAmmo { class ACE_G_Handflare_White: SmokeShell { GVAR(flare) = 1; GVAR(color)[] = {0.5,0.5,0.5,0.5}; + GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\smokeshell\smoke_1.wss", 0.4, 1, 10}; model = "\A3\weapons_f\ammo\flare_white"; dangerRadiusHit = -1; suppressionRadiusHit = -1; @@ -110,6 +106,7 @@ class CfgAmmo { }; class Chemlight_base: SmokeShell { + GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\Other\dry4.wss", 3, 2, 10}; soundImpactHard1[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.8,65}; soundImpactHard2[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.9,65}; soundImpactHard3[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.6,65}; diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index e60b987387..a54a8400ad 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -29,21 +29,11 @@ private _config = configFile >> "CfgAmmo" >> _ammo; // handle special grenades and sounds if (local _unit) then { - // handle priming sound, if not IR grenade - if (_ammo isKindOf "GrenadeHand") then { - private _posASLProjectile = getPosASL _projectile; - - switch (true) do { - case (_ammo isKindOf "Chemlight_base"): { - playSound3D ["A3\sounds_f\weapons\Other\dry4.wss", objNull, false, _posASLProjectile, 3, 2, 10] - }; - case (_ammo isKindOf "ACE_G_Handflare_White"): { - playSound3D ["A3\sounds_f\weapons\smokeshell\smoke_1.wss", objNull, false, _posASLProjectile, 0.4, 1, 10] - }; - default { - playSound3D ["A3\sounds_f\weapons\grenades\Grenade_PullPin.wss", objNull, false, _posASLProjectile, 1.5, 1, 10] - }; - }; + // handle priming sound, if present + private _soundConfig = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(pullPinSound)); + if (count _soundConfig > 0) then { + _soundConfig params ["_file", "_volume", "_pitch", "_distance"]; + playSound3D [_file, objNull, false, getPosASL _projectile, _volume, _pitch, _distance]; }; if (getNumber (_config >> QGVAR(flashbang)) == 1) then {