Merge pull request #1497 from acemod/Fix-PlayFiremodeChangedSound

Fixed find file extension in playChangefiremode
This commit is contained in:
Glowbal 2015-06-06 21:39:34 +02:00
commit c75ae71adf

View File

@ -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"];
};