소스 검색

Merge pull request #180 from 501st-Aux-Mod-Team/fix-squad-shield-sound

Fix squad shield sound
Erliens 3 년 전
부모
커밋
ff42da25c0
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      addons - Copy/RD501_Main/functions/fired_deployable/fnc_fired_deployable_deployServer.sqf

+ 5 - 3
addons - Copy/RD501_Main/functions/fired_deployable/fnc_fired_deployable_deployServer.sqf

@@ -54,6 +54,8 @@ if(_timeToLive > 0) then {
 	};
 };
 
-if(_hasLoopSound && !isNil _loopSound && _loopSound != "") then {
-	["rd501_fired_deployable_soundLoop", [_deployed, _loopSound, _loopDuration, _timeToLive, _soundDistance]] call CBA_fnc_globalEvent;
-};
+if(!_hasLoopSound || _loopSound == "") exitWith {
+	diag_log format["Decided not to play sound for: Loop Sound: '%1', Loop Sound: '%2'", _loopSound, _hasLoopSound];
+};
+
+["rd501_fired_deployable_soundLoop", [_deployed, _loopSound, _loopDuration, _timeToLive, _soundDistance]] call CBA_fnc_globalEvent;