fixes to ACRE volume, and this transform should really be in set/get global volume. Closes #588

This commit is contained in:
jaynus 2015-04-14 14:45:21 -07:00
parent 2f2eab87e2
commit c6943fbdaf
4 changed files with 7 additions and 7 deletions

View File

@ -52,4 +52,4 @@ _lowestVolume = 1;
// Set Radio mod variables.
player setVariable ["tf_globalVolume", _lowestVolume];
player setVariable ["acre_sys_core_globalVolume", _lowestVolume];
[_lowestVolume] call acre_api_fnc_setGlobalVolume;

View File

@ -27,7 +27,7 @@ if (_setVolume) then {
player setVariable ["tf_unable_to_use_radio", false];
// ACRE2
[NORMAL_LEVEL] call acre_api_fnc_setGlobalVolume;
if (!isNil "acre_api_fnc_setGlobalVolume") then { [NORMAL_LEVEL^0.33] call acre_api_fnc_setGlobalVolume; };
player setVariable ["acre_sys_core_isDisabled", false, true];
} else {
@ -40,7 +40,7 @@ if (_setVolume) then {
player setVariable ["tf_unable_to_use_radio", true];
// ACRE2
[MUTED_LEVEL] call acre_api_fnc_setGlobalVolume;
if (!isNil "acre_api_fnc_setGlobalVolume") then { [MUTED_LEVEL^0.33] call acre_api_fnc_setGlobalVolume; };
player setVariable ["acre_sys_core_isDisabled", true, true];
};

View File

@ -56,7 +56,7 @@ if (!(missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false])) then {
0.1 fadeSound _volume;
0.1 fadeSpeech _volume;
ACE_player setVariable ["tf_globalVolume", _volume];
if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume] call acre_api_fnc_setGlobalVolume;};
if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;};
};
//hintSilent format ["GVAR(currentDeafness), _Volume = %1, %2", GVAR(currentDeafness), _volume];

View File

@ -21,14 +21,14 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
_unit setVariable ["acre_sys_core_globalVolume", 0.4];
if (!isNil "acre_api_fnc_setGlobalVolume") then { [0.4] call acre_api_fnc_setGlobalVolume; };
} else {
_unit setVariable ["tf_globalVolume", 1];
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", false, true];
_unit setVariable ["acre_sys_core_globalVolume", 1];
if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; };
};
};
}] call ace_common_fnc_addEventHandler;