From c7ff2eff3dfe91141cc627b81332bf58276dd2b3 Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Wed, 22 Jul 2020 21:40:58 -0500 Subject: [PATCH] Update blizzard.sqf Add low volume version of blizzard sound effect for players inside buildings. --- SQF/dayz_code/system/weather/blizzard.sqf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SQF/dayz_code/system/weather/blizzard.sqf b/SQF/dayz_code/system/weather/blizzard.sqf index 7264a5cf6..4bc29bdfe 100644 --- a/SQF/dayz_code/system/weather/blizzard.sqf +++ b/SQF/dayz_code/system/weather/blizzard.sqf @@ -13,7 +13,9 @@ _windY = _windspd * (cos _winddir); _windZ = 5 - (random 10); snow = 1; _t = diag_tickTime; -playSound "blizzard"; + +// If the player is inside a building play the low volume version of the blizzard sound effect. +playsound (["blizzard","blizzardLow"] select dayz_inside); if !(isNil "DZE_WeatherDebugTime") then {diag_log format ["Blizzard started at %1",(diag_tickTime - DZE_WeatherDebugTime)];}; @@ -22,11 +24,12 @@ while {!DZE_WeatherEndThread} do { _vel = velocity vehicle player; _i = 0; + if (diag_tickTime - _t >= 10) then { + playsound (["blizzard","blizzardLow"] select dayz_inside); + _t = diag_tickTime; + }; + if (!dayz_inside) then { - if (diag_tickTime - _t >= 10) then { - playSound "blizzard"; // Blizzard sound is a 10 second clip. - _t = diag_tickTime; - }; while {_i < 25} do { _dpos = [((_pos select 0) + (25 - (random (2*25))) + ((_vel select 0)*6)) - (_windX),((_pos select 1) + (25 - (random (2*25))) + ((_vel select 1)*6)) - (_windY),((_pos select 2) + 3)]; // Snow Particles @@ -42,4 +45,4 @@ while {!DZE_WeatherEndThread} do { 0 setFog _fogOriginal; // Reset fog to original. snow = 0; -if !(isNil "DZE_WeatherDebugTime") then {diag_log format ["Blizzard ended at %1",(diag_tickTime - DZE_WeatherDebugTime)];}; \ No newline at end of file +if !(isNil "DZE_WeatherDebugTime") then {diag_log format ["Blizzard ended at %1",(diag_tickTime - DZE_WeatherDebugTime)];};