diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index c0fa00645..ee7a84d43 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -12,7 +12,7 @@ [NEW] Added "RedRyder" and "350Rnd_BB_Magazine" to loot pile. #1456 #1457 @Namindu [NEW] Added action to lock and unlock vehicles from inside #1103 @pj999 @ebaydayz [NEW] Autorun hotkey (0 = Toggle auto run) @ebaydayz -[NEW] Earplugs hotkey and status UI icon (F1 = Lower volume). Automatically disabled when exiting a vehicle. @ebaydayz +[NEW] Mute sound hotkey and status UI icon (F1 = Lower sound effects volume). Automatically disabled when exiting a vehicle. @ebaydayz [NEW] Snap building, use DZE_modularBuild = true; in init.sqf to enable. @raymix [NEW] Auto login when a player joins the server, default 10 seconds, requires description.ext update in the mission (disable in description.ext by setting defValueParam1 = 31;) @icomrade [NEW] Many new configuration options are available for admins. See dayz_code\configVariables.sqf and mission\init.sqf for descriptions. @ebaydayz diff --git a/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp b/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp index 10fa25ee5..0f0a65557 100644 --- a/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp @@ -216,10 +216,19 @@ class RscTitles h = 0.10; colorText[] = {1,1,1,1}; }; + class RscPicture_1904: RscPictureGUI + { + idc = 1904; + text = "\z\addons\dayz_code\gui\status\status_bg.paa"; + x = 0.955313 * safezoneW + safezoneX; + y = 0.51 * safezoneH + safezoneY; + w = 0.075; + h = 0.10; + }; class RscPicture_1204: RscPictureGUI { idc = 1204; - text = "\z\addons\dayz_code\gui\status_epoch\status_audio_muted.paa"; // was previously status_connection_ca, not used + text = "\z\addons\dayz_code\gui\status\status_sound_muted.paa"; // previously status_connection_ca which is not used x = 0.955313 * safezoneW + safezoneX; y = 0.51 * safezoneH + safezoneY; w = 0.075; @@ -427,10 +436,19 @@ class RscTitles h = 0.10; colorText[] = {1,1,1,1}; }; + class RscPicture_1904: RscPictureGUI + { + idc = 1904; + //text = "\z\addons\dayz_code\gui\status\status_bg.paa"; + x = 0.955313 * safezoneW + safezoneX; + y = 0.51 * safezoneH + safezoneY; + w = 0.075; + h = 0.10; + }; class RscPicture_1204: RscPictureGUI { idc = 1204; - text = "\z\addons\dayz_code\gui\status_epoch\status_audio_muted.paa"; // was previously status_connection_ca, not used + text = "\z\addons\dayz_code\gui\status\status_sound_muted.paa"; // previously status_connection_ca which is not used x = 0.955313 * safezoneW + safezoneX; y = 0.51 * safezoneH + safezoneY; w = 0.075; diff --git a/SQF/dayz_code/compile/keyboard.sqf b/SQF/dayz_code/compile/keyboard.sqf index 52d431e1b..f1624709d 100644 --- a/SQF/dayz_code/compile/keyboard.sqf +++ b/SQF/dayz_code/compile/keyboard.sqf @@ -56,7 +56,7 @@ if (isNil "keyboard_keys") then { _handled = true; }; _muteSound = { - call player_muteSound; + call player_toggleSoundMute; _handled = true; }; _rifle = { diff --git a/SQF/dayz_code/compile/player_muteSound.sqf b/SQF/dayz_code/compile/player_toggleSoundMute.sqf similarity index 51% rename from SQF/dayz_code/compile/player_muteSound.sqf rename to SQF/dayz_code/compile/player_toggleSoundMute.sqf index 1fe52401e..99c395f51 100644 --- a/SQF/dayz_code/compile/player_muteSound.sqf +++ b/SQF/dayz_code/compile/player_toggleSoundMute.sqf @@ -1,18 +1,21 @@ -private ["_control","_display"]; +private ["_background","_icon","_display"]; disableSerialization; _display = uiNamespace getVariable "DAYZ_GUI_display"; if (!isNil "_display") then { - _control = _display displayCtrl 1204; + _background = _display displayCtrl 1904; + _icon = _display displayCtrl 1204; if (dayz_soundMuted) then { dayz_soundMuted = false; 1 fadeSound 1; - _control ctrlShow false; + _background ctrlShow false; + _icon ctrlShow false; } else { dayz_soundMuted = true; 1 fadeSound 0.25; - _control ctrlShow true; + _background ctrlShow true; + _icon ctrlShow true; }; }; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_updateGui.sqf b/SQF/dayz_code/compile/player_updateGui.sqf index b0c5dca0b..6b329177e 100644 --- a/SQF/dayz_code/compile/player_updateGui.sqf +++ b/SQF/dayz_code/compile/player_updateGui.sqf @@ -45,10 +45,12 @@ _ctrlTemp = _display displayCtrl 1306; _ctrlEar = _display displayCtrl 1304; _ctrlEye = _display displayCtrl 1305; _ctrlFracture = _display displayCtrl 1203; +_ctrlMuteBackground = _display displayCtrl 1904; +_ctrlMuteIcon = _display displayCtrl 1204; if (!dayz_soundMuted) then { - _control = _display displayCtrl 1204; //muted speaker icon - _control ctrlShow false; + _ctrlMuteBackground ctrlShow false; + _ctrlMuteIcon ctrlShow false; }; //Food/Water/Blood diff --git a/SQF/dayz_code/compile/player_updateGuiDark.sqf b/SQF/dayz_code/compile/player_updateGuiDark.sqf index 83df6db19..3c2a66adc 100644 --- a/SQF/dayz_code/compile/player_updateGuiDark.sqf +++ b/SQF/dayz_code/compile/player_updateGuiDark.sqf @@ -45,10 +45,12 @@ _ctrlEye = _display displayCtrl 1305; //_ctrlHumanity = _display displayCtrl 1207; _ctrlCombat = _display displayCtrl 1307; _ctrlFracture = _display displayCtrl 1203; +_ctrlMuteBackground = _display displayCtrl 1904; +_ctrlMuteIcon = _display displayCtrl 1204; if (!dayz_soundMuted) then { - _control = _display displayCtrl 1204; //muted speaker icon - _control ctrlShow false; + _ctrlMuteBackground ctrlShow false; + _ctrlMuteIcon ctrlShow false; }; //Food/Water/Blood diff --git a/SQF/dayz_code/compile/player_updateGuiEpoch.sqf b/SQF/dayz_code/compile/player_updateGuiEpoch.sqf index 6171a3c70..3b2e2fcfd 100644 --- a/SQF/dayz_code/compile/player_updateGuiEpoch.sqf +++ b/SQF/dayz_code/compile/player_updateGuiEpoch.sqf @@ -36,10 +36,12 @@ _ctrlEye = _display displayCtrl 1305; //_ctrlHumanity = _display displayCtrl 1207; _ctrlCombat = _display displayCtrl 1307; _ctrlFracture = _display displayCtrl 1203; +_ctrlMuteBackground = _display displayCtrl 1904; +_ctrlMuteIcon = _display displayCtrl 1204; if (!dayz_soundMuted) then { - _control = _display displayCtrl 1204; //muted speaker icon - _control ctrlShow false; + _ctrlMuteBackground ctrlShow false; + _ctrlMuteIcon ctrlShow false; }; //Food/Water/Blood diff --git a/SQF/dayz_code/compile/vehicle_getOut.sqf b/SQF/dayz_code/compile/vehicle_getOut.sqf index 52f0ed293..7a00d8684 100644 --- a/SQF/dayz_code/compile/vehicle_getOut.sqf +++ b/SQF/dayz_code/compile/vehicle_getOut.sqf @@ -7,7 +7,7 @@ _position = _this select 1; _unit = _this select 2; if (_unit == player) then { - if (dayz_soundMuted) then {call player_muteSound;}; // Automatically disable sound mute on vehicle exit + if (dayz_soundMuted) then {call player_toggleSoundMute;}; // Automatically disable sound mute on vehicle exit _buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]); if (_buildables > 0) then { diff --git a/SQF/dayz_code/gui/status/status_sound_muted.paa b/SQF/dayz_code/gui/status/status_sound_muted.paa new file mode 100644 index 000000000..598a27d05 Binary files /dev/null and b/SQF/dayz_code/gui/status/status_sound_muted.paa differ diff --git a/SQF/dayz_code/gui/status_epoch/status_audio_muted.paa b/SQF/dayz_code/gui/status_epoch/status_audio_muted.paa deleted file mode 100644 index b7d1eeb40..000000000 Binary files a/SQF/dayz_code/gui/status_epoch/status_audio_muted.paa and /dev/null differ diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 04716b5d9..8050a5a95 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -120,7 +120,7 @@ if (!isDedicated) then { player_sharpen = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sharpen.sqf"; //ui - player_muteSound = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_muteSound.sqf"; + player_toggleSoundMute = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_toggleSoundMute.sqf"; player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf"; player_gearSet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.sqf"; ui_changeDisplay = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_changeDisplay.sqf";