diff --git a/addons/wardrobe/XEH_PREP.hpp b/addons/wardrobe/XEH_PREP.hpp index 36286bec196..e2bc8559567 100644 --- a/addons/wardrobe/XEH_PREP.hpp +++ b/addons/wardrobe/XEH_PREP.hpp @@ -35,8 +35,6 @@ PREP(getCfgDataRandom); // Debug PREP(getAllWardrobeItems); PREP(compare_container_maxLoad); -// Effects -PREP(say3d); // TO BE DELETED ONCE https://github.com/acemod/ACE3/pull/10619 has merged // CBA Context Menu PREP(enable_contextMenu); PREP(addCM_nextvariant); diff --git a/addons/wardrobe/XEH_postInit.sqf b/addons/wardrobe/XEH_postInit.sqf index e71b70bd49e..75fa2c87365 100644 --- a/addons/wardrobe/XEH_postInit.sqf +++ b/addons/wardrobe/XEH_postInit.sqf @@ -1,4 +1,18 @@ #include "script_component.hpp" -[ QGVAR(EH_say3d), FUNC(say3d) ] call CBA_fnc_addEventHandler; // TO BE DELETED ONCE https://github.com/acemod/ACE3/pull/10619 has merged [ QGVAR(EH_updateMagIDs), FUNC(spareBarrel_updateMagIDs) ] call CBA_fnc_addEventHandler; + +[ + QGVAR(EH_say3d), + { + params [["_source", objNull, [objNull]],["_sound",[""],["", []]]]; + if (_sound isEqualType [] && {_sound#0 == ""} || {_sound isEqualType "" && {_sound == ""}}) exitWith {}; + _sound params [ + "_className", + ["_distance", 50, [0]], + ["_pitch", 0.95 + random 0.1, [0]] + ]; + _source say3D [_className, _distance, _pitch, _isSpeech, _offSet, _simSpeedOfSound]; + nil + } +] call CBA_fnc_addEventHandler; diff --git a/addons/wardrobe/functions/fnc_say3d.sqf b/addons/wardrobe/functions/fnc_say3d.sqf deleted file mode 100644 index df038d05764..00000000000 --- a/addons/wardrobe/functions/fnc_say3d.sqf +++ /dev/null @@ -1,49 +0,0 @@ -// TO BE DELETED ONCE https://github.com/acemod/ACE3/pull/10619 has merged - -#include "../script_component.hpp" - -/* - * Author: OverlordZorn - * CBA Event: "ace_wardrobe_eh_say3d" - * Function to use say3D - * If not defined otherwise, the Pitch will be randomised between 95% to 105% - * - * Arguments: - * 0: Sound Source - * 1: CfgSound Classname or Parameter Array - * - 0: CfgSound Classname - * - 1: distance in meters (default: 50) - * - 2: pitch (default: random from 0.95 to 1.05) - * - 3: is Speech (default: false) - * - 4: offset (default: 0) - * - 4: Simulate Speed of Sound (default: false) - * - * Return Value: - * None - * - * Example: - * [player, "ace_horny_bonk"] call ace_wardrobe_fnc_say3d - * - * Public: No - */ - -params [ - ["_source", objNull, [objNull] ], - ["_sound", [""], ["", []] ] -]; - -if (_sound isEqualType [] && {_sound#0 == ""} || {_sound isEqualType "" && {_sound == ""}}) exitWith {}; - -_sound params [ -"_className", -["_distance", 50, [0] ], -["_pitch", 0.95 + random 0.1, [0] ], -["_isSpeech", false, [false, 0] ], -["_offSet", 0, [0] ], -["_simSpeedOfSound", false, [false] ] -]; - - -_source say3D [_className, _distance, _pitch, _isSpeech, _offSet, _simSpeedOfSound]; - -nil