From 9bbeb7183ea4d5fd780a47e8438b64269e951fe4 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Thu, 4 Jun 2015 10:39:43 +0200 Subject: [PATCH] Fixed find file extension in playChangefiremode --- addons/safemode/functions/fnc_playChangeFiremodeSound.sqf | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf index 524605ed5a..754a02005c 100644 --- a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf @@ -11,12 +11,7 @@ if (count _sound == 0) exitWith { }; // add file extension -if call { - { - if (toLower (_sound select 0) find _x == count toArray (_sound select 0) - count toArray _x - 1) exitWith {false}; - true - } forEach [".wav", ".ogg", ".wss"]; -} then { +if ({(toLower (_sound select 0) find _x == (count toArray (_sound select 0) - count toArray _x) - 1)} count [".wav", ".ogg", ".wss"] == 0) then { _sound set [0, (_sound select 0) + ".wss"]; };