2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2021-10-14 15:46:43 +00:00
|
|
|
/*
|
|
|
|
* Author: Kingsley
|
|
|
|
* Lowers the game and music volume with values from ACE settings.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_volume_fnc_lowerVolume
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
EGVAR(hearing,disableVolumeUpdate) = true;
|
|
|
|
|
|
|
|
private _coef = XGVAR(reduction) / 10;
|
|
|
|
private _reductionGame = _coef * GVAR(initialGameVolume);
|
|
|
|
private _reductionMusic = _coef * GVAR(initialMusicVolume);
|
|
|
|
|
|
|
|
XGVAR(fadeDelay) fadeSound (GVAR(initialGameVolume) - _reductionGame);
|
|
|
|
XGVAR(fadeDelay) fadeMusic (GVAR(initialMusicVolume) - _reductionMusic);
|
|
|
|
|
|
|
|
GVAR(isLowered) = true;
|
|
|
|
|
|
|
|
if (XGVAR(showNotification)) then {
|
|
|
|
[LLSTRING(Lowered)] call EFUNC(common,displayTextStructured);
|
|
|
|
};
|